v.21.8Improvement
Implement bin/hex Function from AggregateFunction States
Implement functionbin/hexfromAggregateFunctionstates. #26094 (zhaoyu).
Why it matters
This feature provides users the ability to serialize and inspect the internal states of aggregate functions in binary and hexadecimal formats, which aids in debugging, state transfer, and custom processing scenarios.How to use it
Use thebin or hex functions on aggregate function states as you would with other expressions, for example:sql<br>SELECT hex(my_aggregate_function(state)) FROM my_table<br>This will convert the aggregate state into a hexadecimal string.