ENCODE_SORT_KEY (Lakehouse v2)
Encodes values into a binary sort key that preserves the sort order. Useful for compound sort keys.
Analyze Syntax
Section titled “Analyze Syntax”func.encode_sort_key(get_column(table, 'col1'), get_column(table, 'col2'))Analyze Examples
Section titled “Analyze Examples”func.encode_sort_key(get_column(table, 'name'), get_column(table, 'age'))
┌───────────────────┐│ (binary sort key) │└───────────────────┘SQL Syntax
Section titled “SQL Syntax”ENCODE_SORT_KEY(<expr1>[, <expr2>, ...])SQL Examples
Section titled “SQL Examples”SELECT HEX(ENCODE_SORT_KEY('Alice', 30));
┌────────────────────────┐│ (hex-encoded sort key) │└────────────────────────┘