TPC Logical Tuning Profiles¶
BenchBox uses a platform-neutral logical profile for checked-in TPC-H and
TPC-DS tuned templates. The profile lives at
benchbox/core/tuning/profiles/tpc.yaml; typed loading, capability mapping,
and template validation live under benchbox/core/tuning/.
The profile is the workload evidence source. Platform YAML files are consumers of that profile, not independent sources of truth. A tuned Databricks run and a tuned DuckDB run can therefore be compared by asking two separate questions:
Did both runs request the same logical workload profile?
Which physical mechanisms did each platform use to represent that profile?
Logical Profile¶
Each candidate records:
benchmark id:
tpchortpcdstable and column in canonical all-caps form
SQL type
bounded logical roles such as
temporal_partition,join_locality,high_selectivity_filter,fact_dimension_join,group_order_locality, anddistribution_candidatequery evidence: count, query ids, evidence source, acceptance status, and rationale
Statuses:
existing_baseline: already present before the recovered TPC tuning auditaccepted: added from query-template evidencedropped_low_evidence: intentionally excluded unless future evidence changes
Dropped candidates are part of the profile so they cannot silently reappear in a checked-in template.
Platform Mapping¶
Logical parity does not require identical physical features.
Databricks guidance rechecked on 2026-05-26:
Liquid Clustering replaces table partitioning and ZORDER for Delta layout, is GA for Delta Lake on Databricks Runtime 15.2 and above, and is recommended for new tables.
Manual Liquid Clustering uses
CREATE TABLE ... CLUSTER BY (...)orALTER TABLE ... CLUSTER BY (...), supports up to four clustering keys, and Databricks recommends converting legacy partition and ZORDER columns into clustering keys when migrating.Automatic Liquid Clustering uses
CLUSTER BY AUTO, requires Unity Catalog managed Delta tables with Databricks Runtime 15.4 LTS or above for intelligent key selection, and relies on predictive optimization and query history.OPTIMIZEgroups files by Liquid keys for clustered tables.OPTIMIZE FULLcan force reclustering on Databricks Runtime 16.0 and above.ZORDER cannot be used with Liquid Clustering.
Sources: Databricks Liquid Clustering documentation
(https://docs.databricks.com/gcp/en/delta/clustering), Databricks OPTIMIZE
documentation (https://docs.databricks.com/aws/en/delta/optimize), and
Databricks data-skipping documentation
(https://docs.databricks.com/gcp/en/delta/data-skipping).
Platform |
Logical roles |
Physical mapping |
|---|---|---|
Databricks |
temporal locality |
Delta |
Databricks |
joins, filters, group/order locality |
|
Databricks |
distribution candidates |
logical locality hints folded into |
Databricks |
all accepted TPC candidates |
|
Databricks |
partitioning, locality, and ZORDER-style candidates |
|
DuckDB |
temporal locality |
|
DuckDB |
joins, filters, group/order locality, distribution candidates |
|
BigQuery |
temporal locality |
partitioning when column shape is supported |
BigQuery |
joins, filters, group/order locality |
clustering, with the four-column limit explicit; distribution keys are unsupported |
Redshift |
distribution plus locality candidates |
dist-key plus sort-key decisions; dist-key remains limited to a single key |
Redshift |
locality candidates |
sort-key decisions |
Snowflake |
locality candidates |
clustering keys where useful |
Snowflake |
distribution candidates |
unsupported; no user-managed distribution key |
Platforms without a meaningful physical mechanism must return a structured unsupported or waived decision. They must not be reported as fully mapped.
Current TPC Template Matrix¶
Platform |
Benchmark |
Template |
Partitioning |
Clustering |
Sorting |
Distribution |
|---|---|---|---|---|---|---|
Databricks |
TPC-H |
|
|
|
none |
|
Databricks |
TPC-H |
|
none |
Liquid AUTO workload-intent columns folded from legacy partitioning, clustering, and distribution candidates |
none |
none |
DuckDB |
TPC-H |
|
|
none |
|
none |
Databricks |
TPC-DS |
|
|
|
none |
|
Databricks |
TPC-DS |
|
none |
Liquid AUTO workload-intent columns folded from legacy partitioning, clustering, and distribution candidates |
none |
none |
DuckDB |
TPC-DS |
|
|
none |
|
none |
The checked-in validator enforces this profile for Databricks and DuckDB:
uv run -- python _project/scripts/tuning_profile_check.py --benchmarks tpch,tpcds --platforms databricks,duckdb --strict
Result Metadata¶
When a TPC tuned template is applied, result execution metadata includes
tuning_profile with:
logical_tuning_profile_idlogical_tuning_profile_versiontuning_template_hashphysical_rendering_idplatform_physical_tuning_mechanismslogical_profile_coverageunmapped_logical_candidatesvalidation_status
The companion tuning payload also includes logical_profile, and the platform
tuning summary includes the profile id, version, template hash, coverage, and
physical mechanisms.
Databricks platform metadata also records requested and resolved clustering
strategy plus applied_layout_operations and skipped_layout_operations.
Result consumers should use those operation lists to distinguish a requested
Liquid/Z-ORDER strategy from statements that were actually attempted and
accepted by the warehouse.
Comparison Semantics¶
Treat tuning_mode == "tuned" as a request for a logical profile, not as proof
of identical storage layout. Databricks may represent a locality candidate with
legacy Delta Z-ORDER, Databricks Liquid AUTO, or another future rendering, while
DuckDB represents the same logical candidate through sort layout. Same logical
profile plus different physical_rendering_id is a cross-mechanism comparison,
not an identical-tuning cohort.
Current Databricks defaults preserve the legacy *_tuned.yaml Z-ORDER rendering.
Use *_liquid_tuned.yaml to request Liquid AUTO. Liquid templates must not
carry z_ordering_enabled, z_ordering_columns, per-table partitioning, or
per-table distribution fields; partition and ZORDER-era candidates are folded
into Liquid workload intent, and automatic clustering does not prove that
Databricks selected every listed column.
Do not compare a fully mapped tuned template to a basic-constraints fallback as if both are equivalent. The fallback means BenchBox could not find a benchmark-specific tuned template for that platform/benchmark cell; result consumers should treat that as a coverage gap unless the cell has an explicit waiver.