Skip to content

Pre-stage the covering-column generator (TemporalParquet)#207

Draft
estebanzimanyi wants to merge 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/covering-prestage
Draft

Pre-stage the covering-column generator (TemporalParquet)#207
estebanzimanyi wants to merge 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/covering-prestage

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

Draft / pre-stage of the MobilityDuck covering-column emission for the MobilityLakehouse — the binding's projection of the MEOS catalog temporalCovering descriptor (MEOS-API #24).

tools/covering/codegen_covering.py reads the descriptor and emits DuckDB macros that materialise the TemporalParquet covering columns of a temporal value:

  • covering_spatial(t) — STBOX covering (xmin..zmax, tmin/tmax, srid) for the spatial temporal types
  • covering_number(t) — TBOX covering (vmin/vmax, tmin/tmax) for the numeric ones

so a writer materialises identical covering columns next to the lossless value, and the table prunes at the Parquet row-group and Iceberg manifest level. The covering schema is generated from the catalog, not hand-written per type.

Verified

The generator is pin-independent, and the emitted covering.sql uses box accessors already in the extension, so it runs on the current build todaytools/covering/test_covering.sql returns the covering columns for a tgeogpoint (xmin=4.4 … zmin=NULL (2D) … srid=4326) and a tfloat (vmin=1.5 vmax=9.2 …).

To land (post-pin)

  1. vendor temporal-covering.json from the merged MEOS-API test(parity): batch 2 — boolops / textfuncs / compops / posops / aggfuncs #24,
  2. wire covering.sql into the extension's load-time SQL,
  3. re-verify against the pinned libmeos.

Kept as a draft until #24 merges and the next ecosystem pin lands.

Generate the DuckDB covering-column macros from the MEOS catalog
temporal-covering descriptor: covering_spatial (STBOX: xmin..zmax, tmin/tmax,
srid), covering_number (TBOX: vmin/vmax, tmin/tmax), and covering_timeOnly
(tbool/ttext: tmin/tmax, no spatial box). The covering schema is projected from
the single catalog source of truth, not hand-written per type.

tools/covering/ holds the vendored descriptor, the generator, the generated
covering.sql, a test, and a README. The generated macros use accessors already
present in the extension, so covering.sql runs on the current build; landing it
means vendoring the descriptor from the merged MEOS-API change, wiring
covering.sql into the extension load-time SQL, and re-verifying against the
pinned libmeos.
@estebanzimanyi estebanzimanyi force-pushed the feat/covering-prestage branch from d63c794 to 0d84825 Compare June 26, 2026 21:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant