Skip to content

spaceSplit and spaceTimeSplit accept LATERAL column inputs#132

Open
estebanzimanyi wants to merge 2 commits into
feat/parity-additions-batchfrom
feat/spacesplit-lateral
Open

spaceSplit and spaceTimeSplit accept LATERAL column inputs#132
estebanzimanyi wants to merge 2 commits into
feat/parity-additions-batchfrom
feat/spacesplit-lateral

Conversation

@estebanzimanyi
Copy link
Copy Markdown
Member

Re-register both splitters as in_out_function table functions so per-row parameters (tgeompoint, sizing constants, origin, duration, torigin, bitmatrix) are read at exec time from the input DataChunk rather than bound once from literals; pattern mirrors duckdb/extension/icu/icu-table-range.cpp. When the input chunk drains, the function leaves output.size() at zero and returns NEED_MORE_INPUT, matching PhysicalTableScan's FINISHED-by-chunk-size contract and PhysicalTableInOutFunction's NEED_MORE_INPUT advance. test/sql/parity/058c_tpoint_split_lateral.test exercises the LATERAL column-input path alongside 058b's literal-input regression. Stacked on #126, which carries the MEOS pin bump and API adaptations the build depends on.

Re-register both splitters as in_out_function table functions so the
per-row parameters (tgeompoint, sizing constants, origin, duration,
torigin, bitmatrix) are read at exec time from the input DataChunk
rather than bound once from literals.  Mirrors duckdb/extension/icu/
icu-table-range.cpp.

The bind callback now only declares return types; SpaceSplitLocalState
carries iteration state so a single input row's bins stream out in
STANDARD_VECTOR_SIZE-bounded chunks.  When the input chunk is drained,
the function leaves output.size()==0 and returns NEED_MORE_INPUT, which
matches PhysicalTableScan's FINISHED contract (return value ignored,
zero-size chunk terminates) and PhysicalTableInOutFunction's LATERAL
contract (NEED_MORE_INPUT advances to the next input chunk).

Adds 058c_tpoint_split_lateral.test covering the column-input path so
the LATERAL plumbing has dedicated coverage alongside 058b's
literal-input regression.
estebanzimanyi added a commit that referenced this pull request May 14, 2026
The portfile pinned REF f11b7443e (Mar 30) but the SHA512 corresponds to
742c1fb5 (May 11). Vcpkg's SHA512 cache silently masked the discrepancy
on some runs (PR #132 succeeded by reusing a cached tarball that matched
the SHA512), but a fresh download fetches f11b7443e's content which still
spells the catalog enum `meosType` (lowercase). That makes
`using meosType = MeosType;` in src/include/tydef.hpp fail to compile
because `MeosType` (the Pascal-cased rename introduced by MobilityDB
PR #790, merged Apr 28) is not yet defined at REF f11b7443e.

Update REF to 742c1fb5 so it matches the existing SHA512. The tarball
content vcpkg actually used in PR #132's green run is now the explicit
pin, and the forward-compat alias compiles cleanly.

Pure portfile fix; no other changes.
estebanzimanyi added a commit that referenced this pull request May 14, 2026
The portfile pinned REF f11b7443e (Mar 30) but the SHA512 corresponds to
742c1fb5 (May 11). Vcpkg's SHA512 cache silently masked the discrepancy
on some runs (PR #132 succeeded by reusing a cached tarball that matched
the SHA512), but a fresh download fetches f11b7443e's content which still
spells the catalog enum `meosType` (lowercase). That makes
`using meosType = MeosType;` in src/include/tydef.hpp fail to compile
because `MeosType` (the Pascal-cased rename introduced by MobilityDB
PR #790, merged Apr 28) is not yet defined at REF f11b7443e.

Update REF to 742c1fb5 so it matches the existing SHA512. The tarball
content vcpkg actually used in PR #132's green run is now the explicit
pin, and the forward-compat alias compiles cleanly.

Pure portfile fix; no other changes.
@estebanzimanyi
Copy link
Copy Markdown
Member Author

Reviewer's quickstart — ~2-3 minutes

What this PR does: spaceSplit and spaceTimeSplit accept LATERAL column inputs.

Risk: focused, single-purpose. Spot-check the source diff + matching tests; CI confirms.

Cross-link: Linux arm64 CI here needs #161 for the orthogonal MeosType build error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant