Skip to content

Generate the TNumber base-value accessors#83

Merged
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/generate-tnumber-value-accessors
Jul 23, 2026
Merged

Generate the TNumber base-value accessors#83
estebanzimanyi merged 1 commit into
MobilityDB:mainfrom
estebanzimanyi:feat/generate-tnumber-value-accessors

Conversation

@estebanzimanyi

@estebanzimanyi estebanzimanyi commented Jul 23, 2026

Copy link
Copy Markdown
Member

The value-at-n and value-at-timestamp accessors of tint and tfloat return the base value through a boolean-plus-result out-parameter, which the converter covered only for timestamps.

This extends the bool-plus-result converter to the base scalar out-parameters, so valueN and valueAtTimestamptz fold to the boxed base value (int or double), or null when the boolean reports no value. The converter reads the concrete element type from the catalog, so no per-class configuration is needed.

A parity test checks valueN and valueAtTimestamptz against direct GeneratedFunctions calls.

The value-collection returns — getValues, whose canonical form is the value spanset tnumber_valuespans (intspanset/floatspanset), and the raw values array — remain for a later slice, since their concrete element type is a base-dependent wrapper.

The value-at-n and value-at-timestamp accessors of tint and tfloat return the
base value through a boolean-plus-result out-parameter, which the converter
covered only for timestamps.

Extend the bool-plus-result converter to the base scalar out-parameters, so
valueN and valueAtTimestamptz fold to the boxed base value (int or double), or
null when the boolean reports no value. The converter reads the concrete
element type from the catalog, so no per-class configuration is needed.

A parity test checks valueN and valueAtTimestamptz against direct
GeneratedFunctions calls.
@estebanzimanyi
estebanzimanyi force-pushed the feat/generate-tnumber-value-accessors branch from b87c512 to cf50338 Compare July 23, 2026 13:46
@estebanzimanyi
estebanzimanyi merged commit a1a5d60 into MobilityDB:main Jul 23, 2026
1 check passed
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