Skip to content

feat(bindings): tile and bin functions parity — emitters / table functions / getters#102

Open
estebanzimanyi wants to merge 2 commits intomainfrom
consolidate/tiles-bins-parity
Open

feat(bindings): tile and bin functions parity — emitters / table functions / getters#102
estebanzimanyi wants to merge 2 commits intomainfrom
consolidate/tiles-bins-parity

Conversation

@estebanzimanyi
Copy link
Copy Markdown
Member

Summary

Consolidates 6 individual parity PRs (previously #62, #79, #81, #82, #85, #88) into one squashed commit.

  • bins(span | spanset, vsize, vorigin) table function
  • Tile emitters: bins/valueBins/timeBins/valueBoxes/valueTimeBoxes
  • valueSplit / timeSplit / valueTimeSplit TableFunctions
  • geo/058 tpoint tile: tiles/boxes/getters + spaceSplit/spaceTimeSplit TableFunctions
  • getBin + tbox tile emitters (valueTiles/timeTiles/valueTimeTiles)
  • Single-tile getters: tbox + stbox variants

Test plan

  • test/sql/parity/025_temporal_tile_getters.test
  • test/sql/parity/026_single_tile_getters.test
  • test/sql/parity/058_tile_emitters.test
  • test/sql/parity/059_split_path.test

🤖 Generated with Claude Code

estebanzimanyi and others added 2 commits May 4, 2026 22:18
…s/tpoint-tile/tile-getters

Consolidates 6 parity branches covering tiling and binning:
- feat/table-fn-bins: span table functions for binning
- feat/parity-temporal-tile-emitters: temporal tile emitter functions
- feat/parity-temporal-tile-tablefunctions: temporal tile table-valued functions
- feat/parity-tpoint-tile: tpoint tile split functions
- feat/parity-tile-getters: temporal tile getter functions
- feat/parity-single-tile-getters: single tile getter functions

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…Split/valueTimeSplit)

Adds the missing RegisterTemporalTileSplit method to TemporalTypes which
was called in LoadInternal but never declared or implemented.

Provides table functions:
  timeSplit(temporal, interval [, timestamptz])         → for all 6 temporal types
  valueSplit(tint, integer [, integer])                 → value-partitioned tint
  valueSplit(tfloat, double [, double])                 → value-partitioned tfloat
  valueTimeSplit(tint/tfloat, size, interval [, origin, torigin])

All use the spaceSplit pattern: Bind pre-computes all fragments via MEOS
into a GlobalTableFunctionState, Exec streams them in STANDARD_VECTOR_SIZE
chunks.

Also fixes temporal literals in 025_temporal_tile_split.test to use explicit
UTC offsets (+00) so the test is timezone-independent.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
estebanzimanyi added a commit that referenced this pull request May 5, 2026
…istance

Parity tests activated (21/23 files now pass; 2 tile/split files remain
skipped pending table-function architecture, tracked by PRs #102/#110):

  015_span_aggfuncs   — SetUnionAgg / SpanUnionAgg / extent (20 assertions)
  022_temporal        — temporal accessors + operators (32 assertions)
  032_temporal_box    — tbox constructors + expandValue/expandTime (3 assertions)
  032_temporal_topops — temporal @> tbox / && temporal / -|- tstzspan (3 assertions)
  036_tnumber_distance — tint<->tint, nad, nearestApproachDistance (3 assertions)
  040_temporal_aggfuncs — TcountAgg/TandAgg/TminAgg/TsumAgg/extent (5 assertions)
  042_temporal_waggfuncs — WminAgg/WmaxAgg/WsumAgg (3 assertions)
  050_geo_inventory   — geo surface manifest activated (1 assertion)
  009_time_ops        — tstzset/tstzspan + interval shift; tstzspan <-> INTERVAL (4 assertions)

Bug fixes:
  - tstzspan/tstzset <-> operator: was registered as INTERVAL but implementation
    returned double, causing INTERNAL crash. Fixed Distance_span_value,
    Distance_value_span (use distance_span_timestamptz), Distance_span_span
    (dispatch on T_TSTZSPAN), Distance_set_value/Distance_value_set/
    Distance_set_set (tstzset case). All time-type distances now return
    interval_t normalised to days+micros so "2 days" formats correctly.
  - expandValue(tbox, INTEGER): TboxExpandValueExecutor<int64_t> caused
    INTERNAL error "Expected vector of type INT64, but found vector of type
    INT32". Fixed template parameter to int32_t.
  - SetUnionAgg(date): date_to_set called raw DuckDB date_t without epoch
    offset conversion, producing dates 30 years in future. Added
    date_to_set_duckdb wrapper using ToMeosDate().

New registrations:
  - "+", {tstzset, INTERVAL} → tstzset: shift alias (MobilityDB @> parity)
  - "+", {tstzspan, INTERVAL} → tstzspan: shift alias
  - SecondsToInterval helper in time_util.hpp

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
estebanzimanyi added a commit that referenced this pull request May 10, 2026
…istance

Parity tests activated (21/23 files now pass; 2 tile/split files remain
skipped pending table-function architecture, tracked by PRs #102/#110):

  015_span_aggfuncs   — SetUnionAgg / SpanUnionAgg / extent (20 assertions)
  022_temporal        — temporal accessors + operators (32 assertions)
  032_temporal_box    — tbox constructors + expandValue/expandTime (3 assertions)
  032_temporal_topops — temporal @> tbox / && temporal / -|- tstzspan (3 assertions)
  036_tnumber_distance — tint<->tint, nad, nearestApproachDistance (3 assertions)
  040_temporal_aggfuncs — TcountAgg/TandAgg/TminAgg/TsumAgg/extent (5 assertions)
  042_temporal_waggfuncs — WminAgg/WmaxAgg/WsumAgg (3 assertions)
  050_geo_inventory   — geo surface manifest activated (1 assertion)
  009_time_ops        — tstzset/tstzspan + interval shift; tstzspan <-> INTERVAL (4 assertions)

Bug fixes:
  - tstzspan/tstzset <-> operator: was registered as INTERVAL but implementation
    returned double, causing INTERNAL crash. Fixed Distance_span_value,
    Distance_value_span (use distance_span_timestamptz), Distance_span_span
    (dispatch on T_TSTZSPAN), Distance_set_value/Distance_value_set/
    Distance_set_set (tstzset case). All time-type distances now return
    interval_t normalised to days+micros so "2 days" formats correctly.
  - expandValue(tbox, INTEGER): TboxExpandValueExecutor<int64_t> caused
    INTERNAL error "Expected vector of type INT64, but found vector of type
    INT32". Fixed template parameter to int32_t.
  - SetUnionAgg(date): date_to_set called raw DuckDB date_t without epoch
    offset conversion, producing dates 30 years in future. Added
    date_to_set_duckdb wrapper using ToMeosDate().

New registrations:
  - "+", {tstzset, INTERVAL} → tstzset: shift alias (MobilityDB @> parity)
  - "+", {tstzspan, INTERVAL} → tstzspan: shift alias
  - SecondsToInterval helper in time_util.hpp

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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