cancel
Showing results for 
Search instead for 
Did you mean: 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results for 
Search instead for 
Did you mean: 

Liquid clustering with boolean columns

Karin
New Contributor II

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! 

1 ACCEPTED SOLUTION

Accepted Solutions

jeroenvs
New Contributor III

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"

View solution in original post

1 REPLY 1

jeroenvs
New Contributor III

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"

Join 100K+ Data Experts: Register Now & Grow with Us!

Excited to expand your horizons with us? Click here to Register and begin your journey to success!

Already a member? Login and join your local regional user group! If there isn’t one near you, fill out this form and we’ll create one for you to join!