-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sqllogictests --complete
does not escape (
in error messages properly
#5727
Comments
I strongly suspect this needs to be fixed upstream in https://github.com/risinglightdb/sqllogictest-rs @xxchan does this sound familiar to you at all? |
cc @melgenek |
I've opened a pr in the sqllogictest-rs risinglightdb/sqllogictest-rs#174. |
Thank you so much @melgenek ! |
I just tested locally (after running |
Describe the bug
sqllogictest automatically verifies error messages, including with regular expression matching
read more about sqllogictest here: https://github.com/apache/arrow-datafusion/tree/main/datafusion/core/tests/sqllogictests
Because it supports regular expression matching, to match an error like this (note
(
and)
):You need to
\(
and\)
:sqllogictests --complete
mode is is awesome and will update the expected output, however for error messages that contain parenthesis it does not escape the parenthesisThis means that output captured with
--complete
that contains errors with(
and)
will not passTo Reproduce
Apply this diff (
Then run the sqllogictest complete mode:
Then run sqllogictest:
cargo test --test sqllogictests -- arrow_typeof
It fails with a very hard to understand error (the reported expected and actual are the same 🤯 ):
Error: query is expected to fail with error: DataFusion error: Error during planning: arrow_cast requires its second argument to be a constant string, got Int64(43) but got error: DataFusion error: Error during planning: arrow_cast requires its second argument to be a constant string, got Int64(43) [SQL] SELECT arrow_cast('1', 43) at tests/sqllogictests/test_files/arrow_typeof.slt:98
Expected behavior
I expect sqllogictest to pass after running
--complete
mode:cargo test --test sqllogictests -- arrow_typeof
Additional context
@tustvold hit this while working on #5685
The symptom was the following very non clear message
The text was updated successfully, but these errors were encountered: