Commit 525932c
fix(schema-compiler): Fix BigQuery queries datetime/timestamp comparisons (#9683)
* ConvertTZ and date_trunc should not change the data type as time dims should be timestamps
* fix intervals math in bq
* fix join conditions date time datatypes comparisons for BQ
* Add tests
* update test snapshots
* fix mssql tests
* fix mysql tests
* fix for redshift
* override runningTotals funcs for BQ.
* tesseract implementation
---------
Co-authored-by: Alexandr Romanenko <[email protected]>1 parent f9ff494 commit 525932c
File tree
33 files changed
+550
-23
lines changed- packages
- cubejs-schema-compiler/src/adapter
- cubejs-testing-drivers
- fixtures
- src/tests
- test/__snapshots__
- rust/cubesqlplanner/cubesqlplanner/src
- planner
- filter
- sql_templates
- plan
33 files changed
+550
-23
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
958 | 958 | | |
959 | 959 | | |
960 | 960 | | |
961 | | - | |
962 | | - | |
| 961 | + | |
963 | 962 | | |
964 | 963 | | |
965 | 964 | | |
| |||
970 | 969 | | |
971 | 970 | | |
972 | 971 | | |
973 | | - | |
| 972 | + | |
974 | 973 | | |
975 | 974 | | |
976 | 975 | | |
| |||
980 | 979 | | |
981 | 980 | | |
982 | 981 | | |
983 | | - | |
| 982 | + | |
984 | 983 | | |
985 | 984 | | |
986 | 985 | | |
| |||
1803 | 1802 | | |
1804 | 1803 | | |
1805 | 1804 | | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
1806 | 1812 | | |
1807 | 1813 | | |
1808 | 1814 | | |
| |||
1837 | 1843 | | |
1838 | 1844 | | |
1839 | 1845 | | |
| 1846 | + | |
| 1847 | + | |
| 1848 | + | |
| 1849 | + | |
| 1850 | + | |
1840 | 1851 | | |
1841 | 1852 | | |
1842 | | - | |
1843 | 1853 | | |
1844 | 1854 | | |
1845 | 1855 | | |
| |||
3921 | 3931 | | |
3922 | 3932 | | |
3923 | 3933 | | |
| 3934 | + | |
3924 | 3935 | | |
3925 | 3936 | | |
3926 | 3937 | | |
| |||
Lines changed: 101 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
45 | | - | |
| 45 | + | |
46 | 46 | | |
47 | 47 | | |
48 | 48 | | |
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
61 | | - | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| |||
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
75 | | - | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
185 | | - | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
193 | 185 | | |
194 | | - | |
| 186 | + | |
195 | 187 | | |
196 | 188 | | |
197 | 189 | | |
198 | 190 | | |
199 | 191 | | |
200 | 192 | | |
201 | | - | |
| 193 | + | |
202 | 194 | | |
203 | | - | |
| 195 | + | |
204 | 196 | | |
205 | 197 | | |
206 | 198 | | |
207 | 199 | | |
208 | 200 | | |
209 | 201 | | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
218 | 302 | | |
219 | 303 | | |
220 | 304 | | |
| |||
250 | 334 | | |
251 | 335 | | |
252 | 336 | | |
253 | | - | |
| 337 | + | |
254 | 338 | | |
255 | 339 | | |
256 | 340 | | |
| |||
263 | 347 | | |
264 | 348 | | |
265 | 349 | | |
266 | | - | |
| 350 | + | |
| 351 | + | |
267 | 352 | | |
268 | 353 | | |
269 | 354 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
165 | 167 | | |
166 | 168 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
157 | 157 | | |
158 | 158 | | |
159 | 159 | | |
160 | | - | |
| 160 | + | |
| 161 | + | |
161 | 162 | | |
162 | 163 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2118 | 2118 | | |
2119 | 2119 | | |
2120 | 2120 | | |
| 2121 | + | |
| 2122 | + | |
| 2123 | + | |
| 2124 | + | |
| 2125 | + | |
| 2126 | + | |
| 2127 | + | |
| 2128 | + | |
| 2129 | + | |
| 2130 | + | |
| 2131 | + | |
| 2132 | + | |
| 2133 | + | |
| 2134 | + | |
| 2135 | + | |
| 2136 | + | |
| 2137 | + | |
| 2138 | + | |
| 2139 | + | |
| 2140 | + | |
2121 | 2141 | | |
2122 | 2142 | | |
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8007 | 8007 | | |
8008 | 8008 | | |
8009 | 8009 | | |
| 8010 | + | |
| 8011 | + | |
| 8012 | + | |
| 8013 | + | |
| 8014 | + | |
| 8015 | + | |
| 8016 | + | |
| 8017 | + | |
| 8018 | + | |
| 8019 | + | |
| 8020 | + | |
| 8021 | + | |
| 8022 | + | |
| 8023 | + | |
| 8024 | + | |
| 8025 | + | |
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
3 | 19 | | |
4 | 20 | | |
5 | 21 | | |
| |||
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8952 | 8952 | | |
8953 | 8953 | | |
8954 | 8954 | | |
| 8955 | + | |
| 8956 | + | |
| 8957 | + | |
| 8958 | + | |
| 8959 | + | |
| 8960 | + | |
| 8961 | + | |
| 8962 | + | |
| 8963 | + | |
| 8964 | + | |
| 8965 | + | |
| 8966 | + | |
| 8967 | + | |
| 8968 | + | |
| 8969 | + | |
| 8970 | + | |
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8952 | 8952 | | |
8953 | 8953 | | |
8954 | 8954 | | |
| 8955 | + | |
| 8956 | + | |
| 8957 | + | |
| 8958 | + | |
| 8959 | + | |
| 8960 | + | |
| 8961 | + | |
| 8962 | + | |
| 8963 | + | |
| 8964 | + | |
| 8965 | + | |
| 8966 | + | |
| 8967 | + | |
| 8968 | + | |
| 8969 | + | |
| 8970 | + | |
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8952 | 8952 | | |
8953 | 8953 | | |
8954 | 8954 | | |
| 8955 | + | |
| 8956 | + | |
| 8957 | + | |
| 8958 | + | |
| 8959 | + | |
| 8960 | + | |
| 8961 | + | |
| 8962 | + | |
| 8963 | + | |
| 8964 | + | |
| 8965 | + | |
| 8966 | + | |
| 8967 | + | |
| 8968 | + | |
| 8969 | + | |
| 8970 | + | |
0 commit comments