feat(bindings): valueSplit / timeSplit / valueTimeSplit TableFunctions#81
Closed
estebanzimanyi wants to merge 1 commit intomainfrom
Closed
feat(bindings): valueSplit / timeSplit / valueTimeSplit TableFunctions#81estebanzimanyi wants to merge 1 commit intomainfrom
estebanzimanyi wants to merge 1 commit intomainfrom
Conversation
Closes the TableFunction-deferred portion of temporal/025_temporal_tile.
Set-returning splitters that bucket a temporal into one row per
(value[, time]) bin, mirroring MobilityDB's
valueSplit(tnumber, vsize[, vorigin])
RETURNS TABLE(value <bigint|double>, <tnumber>)
timeSplit(temporal, duration[, torigin])
RETURNS TABLE(time timestamptz, <temporal>)
valueTimeSplit(tnumber, vsize, duration[, vorigin[, torigin]])
RETURNS TABLE(value <bigint|double>, time timestamptz, <tnumber>)
Implementation pattern mirrors PR #79's spaceSplit / spaceTimeSplit:
- TileBindData captures the input temporal blob, scalar tile parameters,
and a TileKind discriminator (ValueSplit / TimeSplit / ValueTimeSplit).
- TileInit calls the matching MEOS export
(tint_value_split / tfloat_value_split / temporal_time_split /
tint_value_time_split / tfloat_value_time_split) and buffers the
parallel output arrays as Value triples.
- TileExec drains the buffer, switching on TileKind to set the right
set of output columns.
Registered TableFunction overloads (16 total):
- valueSplit on tint and tfloat (with/without vorigin) — 4
- timeSplit on tint, tfloat, tbool, ttext (with/without torigin) — 8
- valueTimeSplit on tint and tfloat (3 origin-arg combinations each) — 6
Hooked into LoadInternal via a new RegisterTemporalTileSplit method on
TemporalTypes, kept distinct from the scalar registrations and the
existing tempUnnest TableFunction.
Test: test/sql/parity/025_temporal_tile_split.test (12 query cases)
covering all three function names on each supported base type, both
default-origin and explicit-origin variants, and a 3-column shape check
on valueTimeSplit output.
Full suite: 772 / 14 cases under TZ=UTC.
This was referenced Apr 30, 2026
Member
Author
|
Superseded by the consolidated PR branch |
4 tasks
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.
Closes the TableFunction-deferred portion of `temporal/025_temporal_tile`. Set-returning splitters that bucket a temporal into one row per (value[, time]) bin.
New SQL surface (16 TableFunction overloads)
Implementation
Mirrors PR #79's spaceSplit/spaceTimeSplit pattern:
Hooked into `LoadInternal` via a new `RegisterTemporalTileSplit` method on `TemporalTypes`, kept distinct from the scalar registrations and the existing `tempUnnest` TableFunction.
Tests
Coverage delta
Per the audit in PR #66:
Test plan