khushishukla2813 opened a new pull request, #14986: URL: https://github.com/apache/datafusion/pull/14986
## Which issue does this PR close? Closes #14437 ## Rationale for this change The current SQL syntax error messages in DataFusion lack detailed context, making debugging difficult for users. This PR improves error reporting by: Showing **unexpected tokens** in the error message. Displaying **exact line and column numbers** for better debugging. Providing **helpful hints** when possible. ## What changes are included in this PR? Enhanced `parser_err!` macro** to include **token details, line, and column. Modified `expected` function** to return more **precise error locations. Added a test case (`test_parser_error_message`)** to verify the improved error messages. ## Are these changes tested? Yes ✅ - A new test case was added in `parser.rs` to check: - Correct error message format. - Proper token identification in error messages. - Correct line and column output. ## Are there any user-facing changes? Yes ✅ - Error messages now provide clearer debugging information. - No breaking changes to existing APIs. -- 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