feat(bindings): tnumber math followups — exp/ln/log10, deltaValue, trend, named-function aliases#71
Closed
estebanzimanyi wants to merge 1 commit intomainfrom
Closed
Conversation
…end, named-function aliases Closes the user-facing tail of temporal/026_tnumber_mathfuncs: Unary tfloat: - exp(tfloat) -> tfloat (tfloat_exp) - ln(tfloat) -> tfloat (tfloat_ln) - log10(tfloat) -> tfloat (tfloat_log10) Unary tnumber: - deltaValue(tint) -> tint - deltaValue(tfloat) -> tfloat - trend(tint) -> tint - trend(tfloat) -> tint (matches MobilityDB's return type) Named-function aliases for the existing arithmetic operators (MobilityDB exposes both forms; the operator versions were already wired): - tnumber_add / sub / mult / div (24 overloads each = 6 × 4 names) routing through the same Add/Sub/Mult/Div_*_* handlers as the `+`/`-`/`*`/`/` operator forms. Test: test/sql/parity/026b_tnumber_mathfuncs_followups.test (12 assertions). Full suite: 764 / 14 cases under TZ=UTC. Files also gain a trailing newline at EOF (per general repo hygiene).
Member
Author
|
Superseded by the consolidated PR branch |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes the user-facing tail of `temporal/026_tnumber_mathfuncs` (was 47%; this brings the user-visible surface to ~100%).
New SQL surface
Unary tfloat math
Unary tnumber
Named-function aliases for the arithmetic operators
`tnumber_add` / `tnumber_sub` / `tnumber_mult` / `tnumber_div` — 6 overloads each (`int × tint`, `tint × int`, `tint × tint`, `float × tfloat`, `tfloat × float`, `tfloat × tfloat`).
These route through the same handlers as the existing `+`/`-`/`*`/`/` operator forms; MobilityDB exposes both names. Verified via assertions like `tnumber_add(tfloat '...', 4.0) = (tfloat '...' + 4.0)` -> `true`.
Tests
Coverage delta
Per the audit in PR #66:
Test plan