- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2023 04:53 AM
Hi community 👋
Is it possible to use boolean columns as cluster keys for liquid clustering on Delta Tables?
I've been trying to set a boolean column as cluster key since it's one of my most common queries when reading from the table. I'm getting the error "DeltaAnalysisException: Liquid clustering requires clustering columns to have stats. Couldn't find clustering column *boolean_column_name* in stats schema" - which doesn't make sense since I've made sure to collect statistics on all columns (delta.dataSkippingNumIndexedCols = -1) and can see stats on the boolean columns as well.
I came across this post by Miles Cole, saying that it's not possible to have boolean data types as clustering keys but it's not stated anywhere in the official documentation.
Any input is appreciated!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-13-2023 05:18 AM
Can confirm that boolean columns are note allowed for liquid clustering. This seems to be undocumented and the error message is not helpful: "couldn't find clustering column in stats schema"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2025 09:15 AM
I saw that boolean columns are not supported by liquid clustering, too. Why? In any case:
By now there is an error that can get raised called DELTA_CLUSTERING_COLUMNS_DATATYPE_NOT_SUPPORTED.
There is also by now documentation of column datatypes that are supported by liquid clustering:
Clustering supports the following data types for clustering keys:
- Date
- Timestamp
- TimestampNTZ (requires Databricks Runtime 14.3 LTS or above)
- String
- Integer
- Long
- Short
- Float
- Double
- Decimal
- Byte