Commit bd617d6
fix: Make preprocessing pipeline run by default
Makes HAVING auto-aliasing and other transformers work without requiring
the --check-in-lifting flag. Preprocessing now runs automatically for all
queries with FROM clauses.
Changes:
- Removed conditional `if config.lift_in_expressions` check
- Preprocessing now runs by default for queries with FROM clauses
- Queries without FROM clauses skip preprocessing (special row-iteration semantics)
- `--show-preprocessing` flag still works to display statistics
User Impact:
- HAVING with aggregates now works out of the box:
SELECT b, SUM(a) FROM t GROUP BY b HAVING SUM(a) > 10 ✅ Works!
- No need for --check-in-lifting flag for basic queries
- --check-in-lifting flag still exists for backward compatibility
Technical Details:
- Queries without FROM bypass preprocessing (use QueryExecutionService)
- Queries with FROM go through preprocessing pipeline
- QueryEngine used only when transformations are applied
- Preserves special behavior for queries without FROM
Example:
# Before: Required flag
sql-cli data.csv -q "..." --check-in-lifting
# After: Works without flag
sql-cli data.csv -q "..."
Note: One Python test (test_null_literal.py::test_coalesce_with_null_literal)
has pre-existing expectations that don't match actual behavior. This is
unrelated to preprocessing changes - test expects 3 rows for a query without
FROM, but tool returns 1 row (verified on commits before this PR).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <noreply@anthropic.com>1 parent 6b944be commit bd617d6
1 file changed
Lines changed: 42 additions & 29 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
409 | | - | |
| 409 | + | |
| 410 | + | |
410 | 411 | | |
411 | | - | |
| 412 | + | |
412 | 413 | | |
413 | 414 | | |
414 | 415 | | |
415 | 416 | | |
416 | 417 | | |
417 | 418 | | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
| 419 | + | |
| 420 | + | |
422 | 421 | | |
423 | | - | |
424 | | - | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
| 443 | + | |
| 444 | + | |
| 445 | + | |
| 446 | + | |
| 447 | + | |
| 448 | + | |
| 449 | + | |
| 450 | + | |
| 451 | + | |
| 452 | + | |
425 | 453 | | |
426 | 454 | | |
427 | 455 | | |
| |||
439 | 467 | | |
440 | 468 | | |
441 | 469 | | |
442 | | - | |
443 | | - | |
444 | | - | |
445 | | - | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
446 | 475 | | |
447 | 476 | | |
448 | 477 | | |
| |||
488 | 517 | | |
489 | 518 | | |
490 | 519 | | |
| 520 | + | |
491 | 521 | | |
492 | 522 | | |
493 | 523 | | |
| |||
507 | 537 | | |
508 | 538 | | |
509 | 539 | | |
510 | | - | |
511 | | - | |
512 | | - | |
513 | | - | |
514 | | - | |
515 | | - | |
516 | | - | |
517 | | - | |
518 | | - | |
519 | | - | |
520 | | - | |
521 | | - | |
522 | | - | |
523 | | - | |
524 | | - | |
525 | | - | |
526 | | - | |
527 | 540 | | |
528 | 541 | | |
529 | 542 | | |
| |||
0 commit comments