Skip to content

fix: inline numeric val nodes in column expression xpr trees#1599

Draft
hm23 wants to merge 2 commits into
mainfrom
fix/inline-numeric-vals-in-column-xpr
Draft

fix: inline numeric val nodes in column expression xpr trees#1599
hm23 wants to merge 2 commits into
mainfrom
fix/inline-numeric-vals-in-column-xpr

Conversation

@hm23
Copy link
Copy Markdown
Contributor

@hm23 hm23 commented May 6, 2026

Numeric val nodes inside xpr trees (e.g. CASE WHEN THEN/ELSE values) used as SELECT column expressions are now rendered as inline SQL literals instead of bound parameters. This fixes "Cannot set parameter at row: 1. Argument must be a string" errors with hdb v2 when calculated elements use CASE WHEN with integer return values.

The existing column_expr() guard only inlined bare numeric val nodes. The new _xprWithInlineNumericVals() helper recursively marks numeric vals inside xpr subtrees with param:false using prototype-based non-mutating wrappers.

hm23 added 2 commits May 6, 2026 16:13
Numeric val nodes inside xpr trees (e.g. CASE WHEN THEN/ELSE values)
used as SELECT column expressions are now rendered as inline SQL literals
instead of bound parameters. This fixes "Cannot set parameter at row: 1.
Argument must be a string" errors with hdb v2 when calculated elements
use CASE WHEN with integer return values.

The existing column_expr() guard only inlined bare numeric val nodes.
The new _xprWithInlineNumericVals() helper recursively marks numeric
vals inside xpr subtrees with param:false using prototype-based
non-mutating wrappers.
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