changsun20 opened a new pull request, #15696: URL: https://github.com/apache/datafusion/pull/15696
## Which issue does this PR close? Closes #14434 ## Rationale for this change This PR addresses a common SQL anti-pattern where users accidentally use `= NULL` instead of `IS NULL`. While syntactically valid, this comparison always returns NULL in SQL and often indicates a developer mistake. The changes help users identify this pitfall through rich warnings while maintaining full query execution capabilities. ## What changes are included in this PR? 1. Added warning detection for `= NULL` comparisons in predicate contexts 2. Implemented span-based diagnostics highlighting the problematic expression 3. Enhanced SQL parser integration with upgraded sqlparser dependency (0.55+) 4. Warning collection plumbing using non-intrusive RefCell storage 5. Added help messages suggesting `IS NULL` alternative 6. Test coverage for single and multiple occurrences ## Are these changes tested? Yes, this PR includes: - Unit tests for single `= NULL` detection - Validation of multiple warnings in complex expressions - Span position verification - Help message content checks ## Are there any user-facing changes? Yes, but non-breaking. No API changes or behavior modifications - existing queries will still execute normally but may produce additional warnings. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org