Commit d5b6f5c
committed
fix(oracle): resolve bind parameter mismatch for generated time series
Refactor Oracle date/time casting logic to properly handle column
identifiers from generated time series (date_from/date_to) without
treating them as bind parameters.
Previously, all values passed to dateTimeCast/timeStampCast were
treated as bind parameters, causing Oracle NJS-098 errors when
queries with rolling windows generated 10 bind placeholders but only
6 parameter values.
Changes:
- Add helper methods isIdentifierToken() and toTimestampTz() to
centralize casting logic
- Detect column identifiers vs bind parameters ('?')
- Use direct column references for generated series columns
- Preserve bind parameters for filter values only
- Add comprehensive JSDoc documentation
Fixes bind parameter count mismatch that caused NJS-098 errors.1 parent b0b011e commit d5b6f5c
File tree
2 files changed
+88
-5
lines changed- packages/cubejs-schema-compiler
- src/adapter
- test/unit
2 files changed
+88
-5
lines changedLines changed: 56 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
33 | 73 | | |
34 | 74 | | |
35 | 75 | | |
| |||
75 | 115 | | |
76 | 116 | | |
77 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
78 | 125 | | |
79 | | - | |
80 | | - | |
81 | | - | |
| 126 | + | |
82 | 127 | | |
83 | 128 | | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
84 | 136 | | |
85 | | - | |
86 | | - | |
| 137 | + | |
87 | 138 | | |
88 | 139 | | |
89 | 140 | | |
| |||
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
904 | 904 | | |
905 | 905 | | |
906 | 906 | | |
| 907 | + | |
| 908 | + | |
| 909 | + | |
| 910 | + | |
| 911 | + | |
| 912 | + | |
| 913 | + | |
| 914 | + | |
| 915 | + | |
| 916 | + | |
| 917 | + | |
| 918 | + | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
| 932 | + | |
| 933 | + | |
| 934 | + | |
| 935 | + | |
| 936 | + | |
| 937 | + | |
| 938 | + | |
907 | 939 | | |
0 commit comments