Add the temporal-covering projection generator#25
Open
estebanzimanyi wants to merge 2 commits into
Open
Conversation
Fold meta/temporal-covering.json into meos-idl.json as temporalCovering, the single codegen source of truth for projecting a MEOS temporal column into Parquet/Iceberg covering columns (RFC #870 TemporalParquet / #913 Temporal Data Lake). Every binding generates the identical covering schema, so a temporal table prunes the same way on every platform (Iceberg manifest + Parquet row-group min/max) with no spatial-aware engine. The descriptor is keyed by temporal-type class, not by type: the spatial class derives an STBOX covering (xmin..zmax, tmin/tmax, srid) via tspatial_to_stbox; the number class derives a TBOX covering (vmin/vmax, tmin/tmax) via tnumber_to_tbox. parser/covering.py attaches it with a byType index and the set of referenced C symbols; tools/covering_parity.py audits that every symbol is exported by the catalog and every covered type is a real MeosType, reporting any miss as a worklist rather than a pass. Mirrors the portable-aliases infrastructure (descriptor + schema + parser hook + parity audit + tests + doc).
Project the catalog's temporalCovering block onto the canonical, language-agnostic covering-column contract: per temporal type, the ordered covering columns with the fully-composed MEOS expression that derives each from the value (e.g. tgeompoint xmin = stbox_xmin(tspatial_to_stbox(VALUE)), srid = tspatial_srid(VALUE); tfloat vmin = tbox_xmin(tnumber_to_tbox(VALUE))). Every binding generator renders this same contract in its own idiom — a DuckDB GENERATED column, a Spark UDF projection, a PyMEOS writer — so a temporal table prunes the same way on every platform (Iceberg manifest + Parquet row-group min/max). The VALUE placeholder is the temporal column reference the binding substitutes. generator/covering.py is the pure dict->dict projection; generate_covering.py is the CLI writing output/meos-covering-projection.json. Mirrors the generate_movfeat_openapi.py / generator/movfeat.py projection idiom.
d380530 to
16f7d69
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Stacks on #24 (the temporal-covering descriptor). Until #24 merges, this PR's diff shows both commits; review/merge #24 first.
Projects the catalog's
temporalCoveringblock (added by #24) onto the canonical, language-agnostic covering-column contract — per temporal type, the ordered covering columns with the fully-composed MEOS expression that derives each from the value. This is the reference rendering every binding generator (PyMEOS, JMEOS, MobilityDuck, MobilitySpark, …) reproduces in its own idiom, so a temporal table prunes the same way on every platform (Iceberg manifest + Parquet row-group min/max).What it adds
generator/covering.py—build_covering_projection(catalog), puredict → dict. Composes each covering column's expression: aboxcolumn →accessor(box_from(VALUE)), avaluecolumn →accessor(VALUE).VALUEis the temporal column the binding substitutes.generate_covering.py— CLI mirroringgenerate_movfeat_openapi.py; readsoutput/meos-idl.json, writesoutput/meos-covering-projection.json.tests/test_covering_projection.py— unit + live gate.Mirrors the existing projection idiom (
generator/movfeat.py+ root CLI + test).Projected output (sample)
Verification