v.25.8New Feature

Add Hash as a new output format

Added Hash as a new output format. It calculates a single hash value for all columns and rows of the result. This is useful for calculating a "fingerprint" of the result, for example, in use cases where data transfer is a bottleneck. Example: SELECT arrayJoin(['abc', 'def']), 42 FORMAT Hash returns e5f9e676db098fdb9530d2059d8c23ef. #84607 (Robert Schulze).
Introduced a new output format called Hash that computes a single hash value representing all columns and rows of the query result.

Why it matters

The Hash output format provides a concise fingerprint of the query output, which is particularly valuable when data transfer is a bottleneck or when verifying result consistency without transferring the full dataset.

How to use it

To use the Hash output format, append FORMAT Hash at the end of your SELECT query. For example:

SELECT arrayJoin(['abc', 'def']), 42 FORMAT Hash

This returns a single hash string representing the entire result set.