Skip to content

Fix integer parameters inferred as exact decimal values - #3

Merged
tonyalaribe merged 1 commit into
timefusion-upgrade-55from
fix/integer-decimal-parameters-20261025
Oct 25, 2026
Merged

tonyalaribe merged 1 commit into
timefusion-upgrade-55from
fix/integer-decimal-parameters-20261025

Conversation

@tonyalaribe

@tonyalaribe tonyalaribe commented Oct 24, 2026 •

Copy link
Copy Markdown

Prepared endpoint-statistics queries bind integer start/width parameters beside exact decimal EXTRACT(EPOCH) values. The planner infers Decimal128(28, 9), but the integer decoder rejects that target with SQLSTATE 22023. This occurred in TimeFusion at 2026-10-24 23:07:48Z for fingerprint 2e9090a8e2ac44484dadf8257f194c0f.

Use DataFusion's checked scalar cast for integer-to-Decimal128 binding. It retains the requested precision/scale and NULL values; overflow remains an error.

Validation:

  • The new decoder regression fails on the previous implementation. All 70 arrow-pg library tests pass after the fix against upstream DataFusion 55.1, covering INT2/INT4/INT8, epoch values, NULLs, precision limits, and rescaling overflow.
  • Workspace formatting passes.
  • A real TimeFusion wire regression reproduces the original 22023 error, then passes with this decoder. All seven client-compatibility checks pass against TimeFusion's patched dependency graph, including exact positive/negative and nanosecond bucket boundaries.

Local logs: TimeFusion .ci/integer-decimal-parameters/. Repository checks remain pending. The local override is used only for integration validation; TimeFusion will pin the merged Git revision.

@tonyalaribe
tonyalaribe marked this pull request as ready for review October 24, 2026 23:44
@tonyalaribe
tonyalaribe merged commit b973390 into timefusion-upgrade-55 Oct 25, 2026
14 checks 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