Commit 876b504
authored
Simplify comparisons and binary operations involving NULL (#17088)
* Use correct types for arithemtics in tests
* Simplify comparisons and binary operations involving NULL
There were optimizations simplifying some arithmetic operations (`*`,
`/`, `%` and some bitwise operations) when one operand is constant
`NULL`. This can be extended to almost all other binary operators.
* Convert to method on Operator
* Add clarifying comments to returns_null_on_null1 parent 9463cf6 commit 876b504
File tree
8 files changed
+154
-199
lines changed- datafusion
- expr-common/src
- optimizer/src/simplify_expressions
- sqllogictest/test_files
- spark/predicate
- substrait/tests/cases
8 files changed
+154
-199
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
328 | 328 | | |
329 | 329 | | |
330 | 330 | | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
331 | 385 | | |
332 | 386 | | |
333 | 387 | | |
| |||
0 commit comments