Skip to content

test(parity): 015_span_aggfuncs.test — aggregate surface manifest#21

Merged
nhungoc1508 merged 1 commit into
mainfrom
feat/parity-span-aggfuncs
May 4, 2026
Merged

test(parity): 015_span_aggfuncs.test — aggregate surface manifest#21
nhungoc1508 merged 1 commit into
mainfrom
feat/parity-span-aggfuncs

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

Summary

Ports mobilitydb/test/temporal/queries/015_span_aggfuncs.test.sql to test/sql/parity/015_span_aggfuncs.test. Whole file is wrapped in mode skip: MobilityDuck registers no aggregate functions anywhere (grep -rE 'AggregateFunction' src/ returns zero hits in temporal/geo code), so every query in this file fails with "function not found" right now.

The file stands as a tracked manifest of the aggregate surface that needs to land:

  • extent(<span>), extent(<spanset>), extent(<base>), extent(<set>), extent(<spanset>)
  • setUnion(<set>), spanUnion(<span>)
  • tcount, tand, tor, tmin, tmax, tsum (covered in later regression files but use the same infrastructure)

MEOS exposes the transfn / combinefn / finalfn triples for each. DuckDB has its own AggregateFunction registration shape that needs the wrapper layer built — that's the precondition for turning any of these on.

Test plan

  • File parses, 0 active assertions, 1 new test case.

Drafted to flag this as a single architectural gap rather than a per-function follow-up list.

Ports mobilitydb/test/temporal/queries/015_span_aggfuncs.test.sql to
test/sql/parity/015_span_aggfuncs.test. Whole file is wrapped in mode
skip: MobilityDuck registers no AggregateFunction calls anywhere in
src/temporal/ or src/geo/, so every query in this file fails with
"function not found".

The file stands as a tracked manifest of the aggregate surface that
needs to land — extent (over span / spanset / value / set / spanset),
setUnion, spanUnion, and the temporal aggregates that follow in
later regression files (tcount, tand, tor, tmin, tmax, tsum). MEOS
exposes the transfn / combinefn / finalfn triples for each of these;
DuckDB has its own AggregateFunction registration shape that needs
the wrapper layer built.

Suite gains 0 active assertions (all skipped); file gains 1 test case.
estebanzimanyi added a commit that referenced this pull request Apr 28, 2026
Five more parity files added in one commit. All five are
wholesale-skip manifests because the underlying surfaces are unbound
in MobilityDuck. The files stand as a tracked gap inventory for what
still needs to land on the temporal layer.

- 028_tbool_boolops.test
    tbool boolean operators (& AND, | OR, ~ NOT) for value/tbool,
    tbool/value, tbool/tbool combinations. MEOS symbols:
    tand_*, tor_*, tnot_tbool.

- 029_ttext_textfuncs.test
    ttext text functions and concatenation: lower / upper / initcap
    on ttext, || for value/ttext, ttext/value, ttext/ttext. MEOS
    symbols: ttext_lower, ttext_upper, ttext_initcap, *_concat.
    DuckDB suggests `lower(textset)` when given ttext — the existing
    text functions are set-only.

- 030_temporal_compops.test
    Ever-/always- temporal comparison operators (?=, ?<>, ?<, ?<=,
    ?>, ?>= and #=, #<>, #<, #<=, #>, #>=). DuckDB's parser does
    not accept ? or # as operator-name characters at all, so every
    query fails before reaching MEOS. Either add equivalent
    alphabetic functions (ever_eq, always_eq, ...) or extend the
    DuckDB parser.

- 034_temporal_posops.test
    Position operators between temporal types and tbox / tstzspan /
    value (<<#, #>>, &<#, #&>, <<, >>, &<, &>, -|-) for any temporal
    type. Same root-cause shape as the position-predicate fix landed
    for spans (PR #14), one layer up. MEOS symbols: left_tnumber_*,
    right_tnumber_*, overleft_tnumber_*, overright_tnumber_*,
    before_tnumber_*, after_tnumber_*, overbefore_tnumber_*,
    overafter_tnumber_*, adjacent_tnumber_*.

- 040_temporal_aggfuncs.test
    Same architectural gap as PR #21 — tcount, tand, tor, tmin,
    tmax, tsum, extent for temporal types, all needing the
    AggregateFunction infrastructure that MobilityDuck doesn't have
    anywhere yet.

Suite: 747 assertions across 18 test cases (5 new files, 0 new
active assertions).
estebanzimanyi added a commit that referenced this pull request Apr 28, 2026
…emporal_waggfuncs

Four more parity files added in one commit, each as a wholesale-skip
manifest because the underlying surface is unbound in MobilityDuck.

- 009_time_ops.test
    Time-shift arithmetic (`+ interval`, `- interval`) over tstzset /
    tstzspan / tstzspanset, and time-difference distance (`<->`)
    between timestamptz / set / span / spanset pairs. The
    span-span / set-span / spanset-spanset distance variants ARE
    bound and pass in the existing parity files; the
    timestamptz-with-time-type variants are not.

- 032_temporal_box.test
    tbox(<tnumber>) / tbox(<tnumber>, <tnumber>) constructors and
    expandValue / expandTime helpers over tbox. MEOS symbols:
    tnumber_to_tbox, tbox_expand_value, tbox_expand_time.

- 032_temporal_topops.test
    Topological operators (@>, <@, &&, -|-) between temporal and
    {value, tbox, tstzspan, temporal}. The set / span / spanset
    variants are bound; the temporal layer is not.

- 042_temporal_waggfuncs.test
    Windowed temporal aggregates (wcount, wmin, wmax, wsum, wavg).
    Same architectural blocker as PR #21 (015) / PR #24 (040), plus
    needs DuckDB WindowFunction infrastructure (also unused).

Suite: 747 assertions across 22 test cases (4 new files, 0 active).
@estebanzimanyi

Copy link
Copy Markdown
Member Author

Verified against current main: file remains 100% skipped — extent / spanUnion / similar aggregates need MobilityDuck to expose AggregateFunction infrastructure, which it does not yet. This is the architectural manifest for the span aggregate gap.

@estebanzimanyi estebanzimanyi force-pushed the feat/parity-span-aggfuncs branch from 5a0aab5 to cf51df5 Compare April 28, 2026 21:33
estebanzimanyi added a commit that referenced this pull request Apr 28, 2026
Single-file inventory of MobilityDB's mobilitydb/test/geo/queries/
surface. Rather than one parity file per upstream regression file,
this lists what each file covers, what's bound in MobilityDuck
today, and what's missing.

Bound surface (per direct audit of src/geo/tgeompoint.cpp):
- tgeompoint / tgeometry I/O for instant / discrete / continuous /
  sequence-set
- asText / asEWKT / memSize / interp / round / transform
- Constructors (TGEOMPOINT, tgeompointInst, tgeompointSeq,
  tgeompointSeqSet)
- Spatial accessors: getX/Y/Z, length, cumulativeLength, speed,
  direction, azimuth, angularDifference, trajectory
- Topological predicates: e/a/t variants of Contains, Disjoint,
  Dwithin, Intersects, Touches
- Set ops: makeSimple, isSimple, stops
- Restrictions: atGeometry, atStbox, atValues, atTime and the
  matching minus*
- Modification: appendInstant, appendSequence, insert, update,
  deleteTime, merge
- Comparison: temporal_eq / temporal_ne / etc.
- twCentroid, shortestLine, distance_gs, collect_gs

Unbound surface (per upstream regression file, with cross-references
to the temporal-side parity-batch PRs that cover the same gap):
- 051_stbox: stbox tests (whole file currently skipped in
  test/sql/stbox.test for DuckDB 1.4 signature issues).
- 052_tgeo / 052_tpoint: mostly bound — per-type ports would mirror
  PRs #13 / #17 / #18 patterns.
- 053_*_inout: asMFJSON / asWKB / asHexWKB / asGeoJSON — verify
  which are bound.
- 054_*_compops: same parser blocker as PR #24's 030 (?= / #=).
- 056_*_spatialfuncs: bulk bound; setSRID-on-temporal and
  reference-system accessors missing.
- 058_*_tile: same gap as PR #23's 025 but for tspatial.
- 060_*_topops: same pattern as PR #25's 032_temporal_topops.
- 062_*_posops: same pattern as PR #24's 034_temporal_posops plus
  spatial-direction operators.
- 064_*_distance: <-> for tgeo / tpoint; partially bound
  (shortestLine, distance_gs).
- 066_tpoint_similarity: specialisation of PR #23's 038.
- 068_*_aggfuncs: same architectural blocker as PR #21 (no
  AggregateFunction infra).

Suite: 747 assertions, 23 test cases.
@estebanzimanyi estebanzimanyi marked this pull request as ready for review May 1, 2026 19:13
@nhungoc1508 nhungoc1508 merged commit 4580d30 into main May 4, 2026
17 checks passed
nhungoc1508 pushed a commit that referenced this pull request May 4, 2026
Five more parity files added in one commit. All five are
wholesale-skip manifests because the underlying surfaces are unbound
in MobilityDuck. The files stand as a tracked gap inventory for what
still needs to land on the temporal layer.

- 028_tbool_boolops.test
    tbool boolean operators (& AND, | OR, ~ NOT) for value/tbool,
    tbool/value, tbool/tbool combinations. MEOS symbols:
    tand_*, tor_*, tnot_tbool.

- 029_ttext_textfuncs.test
    ttext text functions and concatenation: lower / upper / initcap
    on ttext, || for value/ttext, ttext/value, ttext/ttext. MEOS
    symbols: ttext_lower, ttext_upper, ttext_initcap, *_concat.
    DuckDB suggests `lower(textset)` when given ttext — the existing
    text functions are set-only.

- 030_temporal_compops.test
    Ever-/always- temporal comparison operators (?=, ?<>, ?<, ?<=,
    ?>, ?>= and #=, #<>, #<, #<=, #>, #>=). DuckDB's parser does
    not accept ? or # as operator-name characters at all, so every
    query fails before reaching MEOS. Either add equivalent
    alphabetic functions (ever_eq, always_eq, ...) or extend the
    DuckDB parser.

- 034_temporal_posops.test
    Position operators between temporal types and tbox / tstzspan /
    value (<<#, #>>, &<#, #&>, <<, >>, &<, &>, -|-) for any temporal
    type. Same root-cause shape as the position-predicate fix landed
    for spans (PR #14), one layer up. MEOS symbols: left_tnumber_*,
    right_tnumber_*, overleft_tnumber_*, overright_tnumber_*,
    before_tnumber_*, after_tnumber_*, overbefore_tnumber_*,
    overafter_tnumber_*, adjacent_tnumber_*.

- 040_temporal_aggfuncs.test
    Same architectural gap as PR #21 — tcount, tand, tor, tmin,
    tmax, tsum, extent for temporal types, all needing the
    AggregateFunction infrastructure that MobilityDuck doesn't have
    anywhere yet.

Suite: 747 assertions across 18 test cases (5 new files, 0 new
active assertions).
nhungoc1508 pushed a commit that referenced this pull request May 4, 2026
…emporal_waggfuncs

Four more parity files added in one commit, each as a wholesale-skip
manifest because the underlying surface is unbound in MobilityDuck.

- 009_time_ops.test
    Time-shift arithmetic (`+ interval`, `- interval`) over tstzset /
    tstzspan / tstzspanset, and time-difference distance (`<->`)
    between timestamptz / set / span / spanset pairs. The
    span-span / set-span / spanset-spanset distance variants ARE
    bound and pass in the existing parity files; the
    timestamptz-with-time-type variants are not.

- 032_temporal_box.test
    tbox(<tnumber>) / tbox(<tnumber>, <tnumber>) constructors and
    expandValue / expandTime helpers over tbox. MEOS symbols:
    tnumber_to_tbox, tbox_expand_value, tbox_expand_time.

- 032_temporal_topops.test
    Topological operators (@>, <@, &&, -|-) between temporal and
    {value, tbox, tstzspan, temporal}. The set / span / spanset
    variants are bound; the temporal layer is not.

- 042_temporal_waggfuncs.test
    Windowed temporal aggregates (wcount, wmin, wmax, wsum, wavg).
    Same architectural blocker as PR #21 (015) / PR #24 (040), plus
    needs DuckDB WindowFunction infrastructure (also unused).

Suite: 747 assertions across 22 test cases (4 new files, 0 active).
nhungoc1508 pushed a commit that referenced this pull request May 4, 2026
Single-file inventory of MobilityDB's mobilitydb/test/geo/queries/
surface. Rather than one parity file per upstream regression file,
this lists what each file covers, what's bound in MobilityDuck
today, and what's missing.

Bound surface (per direct audit of src/geo/tgeompoint.cpp):
- tgeompoint / tgeometry I/O for instant / discrete / continuous /
  sequence-set
- asText / asEWKT / memSize / interp / round / transform
- Constructors (TGEOMPOINT, tgeompointInst, tgeompointSeq,
  tgeompointSeqSet)
- Spatial accessors: getX/Y/Z, length, cumulativeLength, speed,
  direction, azimuth, angularDifference, trajectory
- Topological predicates: e/a/t variants of Contains, Disjoint,
  Dwithin, Intersects, Touches
- Set ops: makeSimple, isSimple, stops
- Restrictions: atGeometry, atStbox, atValues, atTime and the
  matching minus*
- Modification: appendInstant, appendSequence, insert, update,
  deleteTime, merge
- Comparison: temporal_eq / temporal_ne / etc.
- twCentroid, shortestLine, distance_gs, collect_gs

Unbound surface (per upstream regression file, with cross-references
to the temporal-side parity-batch PRs that cover the same gap):
- 051_stbox: stbox tests (whole file currently skipped in
  test/sql/stbox.test for DuckDB 1.4 signature issues).
- 052_tgeo / 052_tpoint: mostly bound — per-type ports would mirror
  PRs #13 / #17 / #18 patterns.
- 053_*_inout: asMFJSON / asWKB / asHexWKB / asGeoJSON — verify
  which are bound.
- 054_*_compops: same parser blocker as PR #24's 030 (?= / #=).
- 056_*_spatialfuncs: bulk bound; setSRID-on-temporal and
  reference-system accessors missing.
- 058_*_tile: same gap as PR #23's 025 but for tspatial.
- 060_*_topops: same pattern as PR #25's 032_temporal_topops.
- 062_*_posops: same pattern as PR #24's 034_temporal_posops plus
  spatial-direction operators.
- 064_*_distance: <-> for tgeo / tpoint; partially bound
  (shortestLine, distance_gs).
- 066_tpoint_similarity: specialisation of PR #23's 038.
- 068_*_aggfuncs: same architectural blocker as PR #21 (no
  AggregateFunction infra).

Suite: 747 assertions, 23 test cases.
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.

2 participants