Which of the following is a key LIMITATION of Z-order (OPTIMIZE ... ZORDER BY) compared to liquid clustering?
Show answer & explanation
Correct answer: A
WHY A: The Databricks documentation states: 'Z-order works in tandem with the OPTIMIZE command. You cannot combine files across partition boundaries, and so Z-order clustering can only occur within a partition. For unpartitioned tables, files can be combined across the entire table.' On a partitioned table, OPTIMIZE ZORDER BY therefore runs independently per partition and files from different partitions are never co-sorted together, which limits its effectiveness for queries that span multiple partitions. Liquid clustering organizes data across all files in the table regardless of any partition structure and has no partition-boundary limitation.
WHY NOT B: This confuses statistics collection with a fixed table property. Z-ordering does need statistics on the ZORDER BY columns (Z-ordering on columns without collected statistics is ineffective), but statistics collection can be configured at any time with ALTER TABLE SET TBLPROPERTIES using dataSkippingStatsColumns or dataSkippingNumIndexedCols, and the ZORDER BY columns can differ on every OPTIMIZE run.
WHY NOT C: This swaps the version requirements of the two features. Z-ordering is a long-standing Delta Lake feature available in all supported Databricks Runtime versions; Databricks Runtime 15.2 is the version at which liquid clustering became generally available for Delta Lake tables.
WHY NOT D: This is backwards. Z-ordering works on both partitioned and unpartitioned tables, and it is less constrained on unpartitioned tables because files can be combined across the entire table; on partitioned tables it is confined within partition boundaries.