Skip to content

Register a commuted container signature under the name it declares - #499

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:codegen/commuted-container-sql-name
Oct 24, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:codegen/commuted-container-sql-name

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

A function over two containers that the catalog states under two SQL names, one per argument order, registers each signature under its own name. distance_intspanset_intspan answers spansetDistance(intspanset, intspan) and, its operands swapped, spanDistance(intspan, intspanset); container_scalar_sigs returns the name each signature declares beside its argument types and its order, and the registration reads it instead of the function's first name.

Measured: on main, the swapped forms register as spansetDistance(intspan, intspanset) and its siblings over bigint, float, date and tstz, a name MobilityDB does not declare, and spanDistance(span, spanset) registers nothing. Over the catalog of MobilityDB ac8feb51dc, the commit this branch's pin records, the five register as spanDistance and the five spansetDistance forms with the span first leave; no other registration changes and none is registered twice. test/sql/container_distance.test reads spanDistance(span, spanset) against spansetDistance with the operands swapped, and refuses spansetDistance with the span first.

A function over two containers that the catalog states under two SQL names, one per argument order, registers each signature under its own name. distance_intspanset_intspan answers spansetDistance(intspanset, intspan) and, its operands swapped, spanDistance(intspan, intspanset); container_scalar_sigs returns the name each signature declares beside its argument types and its order, and the registration reads it instead of the function's first name.

Measured: on main, the swapped forms register as spansetDistance(intspan, intspanset) and its siblings over bigint, float, date and tstz, a name MobilityDB does not declare, and spanDistance(span, spanset) registers nothing. Over the catalog of MobilityDB ac8feb51dc, the commit this branch's pin records, the five register as spanDistance and the five spansetDistance forms with the span first leave; no other registration changes and none is registered twice. test/sql/container_distance.test reads spanDistance(span, spanset) against spansetDistance with the operands swapped, and refuses spansetDistance with the span first.
@estebanzimanyi
estebanzimanyi merged commit be06de8 into MobilityDB:main Oct 24, 2026
9 checks passed
@estebanzimanyi
estebanzimanyi deleted the codegen/commuted-container-sql-name branch October 24, 2026 21:56
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