Skip to main content
These settings are available in system.settings and are autogenerated from source.

aggregate_function_input_format

Format for AggregateFunction input during INSERT operations. Possible values:
  • state — Binary string with the serialized state (the default). This is the default behavior where AggregateFunction values are expected as binary data.
  • value — The format expects a single value of the argument of the aggregate function, or in the case of multiple arguments, a tuple of them. They will be deserialized using the corresponding IDataType or DataTypeTuple and then aggregated to form the state.
  • array — The format expects an Array of values, as described in the value option above. All elements of the array will be aggregated to form the state.
Examples For a table with structure:
With aggregate_function_input_format = 'value':
With aggregate_function_input_format = 'array':
Note: The value and array formats are slower than the default state format as they require creating and aggregating values during insertion.

aggregate_functions_null_for_empty

Enables or disables rewriting all aggregate functions in a query, adding -OrNull suffix to them. Enable it for SQL standard compatibility. It is implemented via query rewrite (similar to count_distinct_implementation setting) to get consistent results for distributed queries. Possible values:
  • 0 — Disabled.
  • 1 — Enabled.
Example Consider the following query with aggregate functions:
With aggregate_functions_null_for_empty = 0 it would produce:
With aggregate_functions_null_for_empty = 1 the result would be:
Last modified on July 23, 2026