fix(oracle): resolve bind parameter mismatch for generated time series #10108
+120
−5
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.
Summary
Fixes Oracle NJS-098 bind parameter mismatch errors that occurred when queries with rolling windows generated time series. Previously, generated time series columns (date_from/date_to) were incorrectly treated as bind parameters, causing a mismatch between placeholder count (10) and provided values (6).
Changes
isIdentifierToken()to detect column identifiers vs bind parameterstoTimestampTz()to centralize timestamp conversion logicTechnical Details
Before: All values (including date_from/date_to) were treated as bind parameters with format
:"date_from", causing 10 bind placeholders but only 6 parameter values.After: Column identifiers are detected and used directly:
TO_TIMESTAMP_TZ(date_from, ...)while bind parameters (?) continue to use:"?". This results in correct 6 bind placeholders matching 6 parameter values.Testing
does not bind generated time series date_from/date_toRelated Issues
Fixes Oracle NJS-098 errors: "10 bind placeholders were used in the SQL statement but 6 bind values were provided"
Checklist