Repository navigation
Generate the splits and asMVTGeom from the columns MEOS writes back - #500
Merged
estebanzimanyi merged 2 commits intoOct 25, 2026
Merged
Conversation
MobilityDB declares timeSplit, valueSplit, valueTimeSplit, spaceSplit and spaceTimeSplit as SETOF a composite of the bins and the piece, and the C functions return the pieces and hand each bin array back through an out-parameter. The catalog states per signature which array fills each column (columns, from naming the out-parameter or the return), the SQL defaults and the sizes a short form binds. shape_split reads that: each signature is a table function in-out over its input rows, so the temporal value of a LATERAL call is a column, each row making the one MEOS call when the output reaches it. A body reads the arguments its call passes and the SQL default of the others, and the signatures that differ only in the temporal type share one, reading the type and the column names from its TableFunctionInfo: 19 bodies register 162 forms. The hand registrations of src/temporal/temporal.cpp and src/geo/tgeompoint.cpp are deleted, and the five names leave RETIRE_UNCOVERED_OK. The surface follows MobilityDB where the hand registrations did not. The columns take the names MobilityDB declares (point, time, tpoint for spaceTimeSplit; number, time, tnumber for valueTimeSplit; time, temp for timeSplit). The default time origin '2000-01-03' is read in the `TimeZone` setting, as MobilityDB reads its SQL default and as the generated timeTiles reads it: MobilityDB's regression answers timeSplit(tint '[1@2001-01-01, ...]', '1 week') with the bin Mon Jan 01 00:00:00 2001 PST. The splits reach the tbigint splits, timeSplit over all 20 temporal types, spaceSplit and spaceTimeSplit over tgeometry and tgeogpoint, and the one- and two-size forms. The split tests state UTC-midnight data, so they set `TimeZone` to UTC, and read the columns by MobilityDB's names. 025_temporal_tile_split_forms.test checks the tbigint value splits, timeSplit over ttext and the one-size spaceTimeSplit over tgeometry against the rows of MobilityDB's regression outputs, in its time zone. Measured: the generator run twice over the catalog of the pin ac8feb51dc writes the same surface; 025_temporal_tile_split, 025_temporal_tile_border_inc, 025_temporal_tile, 058b_tpoint_split, 058c_tpoint_split_lateral and 025_temporal_tile_split_forms pass on a native build.
MobilityDB declares asMVTGeom as RETURNS geom_times, the composite of a geometry and the bigint[] of its times, and tpoint_as_mvtgeom answers whether the value meets the bounds and hands the geometry back through one out-parameter and the times through an array and its count. The catalog states per signature which out-parameter fills each column. shape_row_out reads that: each signature is a scalar answering a STRUCT of the declared columns, a geometry handed back alone or an array read whole into a LIST, reading the arguments its call passes and the SQL default of the others. A NULL argument, and a value that meets nothing in the bounds, answer NULL. The hand executor of src/geo/tgeompoint.cpp is deleted, and asMVTGeom leaves RETIRE_UNCOVERED_OK. 076_asmvtgeom_geomeasure.test adds MobilityDB's regression cases, their geometries rounded to six decimals as MobilityDB's regression rounds them: the form with clip false, a 3D trajectory, a value that meets nothing in the bounds, and the error on an extent of 0. Measured: the generator run twice over the catalog of the pin ac8feb51dc writes the same surface; 076_asmvtgeom_geomeasure passes on a native build.
estebanzimanyi
force-pushed
the
gen/columns-written-back
branch
from
October 25, 2026 00:32
862077f to
068cea1
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.
Generate the splits of a temporal value from the catalog
MobilityDB declares timeSplit, valueSplit, valueTimeSplit, spaceSplit and spaceTimeSplit as SETOF a composite of the bins and the piece, and the C functions return the pieces and hand each bin array back through an out-parameter. The catalog states per signature which array fills each column (columns, from naming the out-parameter or the return), the SQL defaults and the sizes a short form binds. shape_split reads that: each signature is a table function in-out over its input rows, so the temporal value of a LATERAL call is a column, each row making the one MEOS call when the output reaches it. A body reads the arguments its call passes and the SQL default of the others, and the signatures that differ only in the temporal type share one, reading the type and the column names from its TableFunctionInfo: 19 bodies register 162 forms. The hand registrations of src/temporal/temporal.cpp and src/geo/tgeompoint.cpp are deleted, and the five names leave RETIRE_UNCOVERED_OK.
The surface follows MobilityDB where the hand registrations did not. The columns take the names MobilityDB declares (point, time, tpoint for spaceTimeSplit; number, time, tnumber for valueTimeSplit; time, temp for timeSplit). The default time origin '2000-01-03' is read in the
TimeZonesetting, as MobilityDB reads its SQL default and as the generated timeTiles reads it: MobilityDB's regression answers timeSplit(tint '[1@2001-01-01, ...]', '1 week') with the bin Mon Jan 01 00:00:00 2001 PST. The splits reach the tbigint splits, timeSplit over all 20 temporal types, spaceSplit and spaceTimeSplit over tgeometry and tgeogpoint, and the one- and two-size forms.The split tests state UTC-midnight data, so they set
TimeZoneto UTC, and read the columns by MobilityDB's names. 025_temporal_tile_split_forms.test checks the tbigint value splits, timeSplit over ttext and the one-size spaceTimeSplit over tgeometry against the rows of MobilityDB's regression outputs, in its time zone.Measured: the generator run twice over the catalog of the pin ac8feb51dc writes the same surface; 025_temporal_tile_split, 025_temporal_tile_border_inc, 025_temporal_tile, 058b_tpoint_split, 058c_tpoint_split_lateral and 025_temporal_tile_split_forms pass on a native build.
Generate asMVTGeom from the catalog
MobilityDB declares asMVTGeom as RETURNS geom_times, the composite of a geometry and the bigint[] of its times, and tpoint_as_mvtgeom answers whether the value meets the bounds and hands the geometry back through one out-parameter and the times through an array and its count. The catalog states per signature which out-parameter fills each column. shape_row_out reads that: each signature is a scalar answering a STRUCT of the declared columns, a geometry handed back alone or an array read whole into a LIST, reading the arguments its call passes and the SQL default of the others. A NULL argument, and a value that meets nothing in the bounds, answer NULL. The hand executor of src/geo/tgeompoint.cpp is deleted, and asMVTGeom leaves RETIRE_UNCOVERED_OK.
076_asmvtgeom_geomeasure.test adds MobilityDB's regression cases, their geometries rounded to six decimals as MobilityDB's regression rounds them: the form with clip false, a 3D trajectory, a value that meets nothing in the bounds, and the error on an extent of 0.
Measured: the generator run twice over the catalog of the pin ac8feb51dc writes the same surface; 076_asmvtgeom_geomeasure passes on a native build.