Accelerations can be partitioned using an arbitrary expression to group rows together into separate files.
This allows Spice to avoid reading unnecessary partitions, making particular queries faster.
To partition your accelerations, add the partition_by acceleration parameter:
This example uses a bucket user-defined function (UDF) to hash the PULocationID column and put each row into one of 50 partition files.
This allows partition pruning for queries that filter on the column referenced in the partition_by expression:
This will result in a scan plan that only reads from the partitions that contain the values from the IN list.
:::warning[Limitations]
engine: duckdb and mode: file.partition_by must have only 1 expression.WHERE foo = barWHERE foo IN (bar, baz, ...)WHERE foo NOT IN (bar, baz, ...):::