Repository navigation
Description
Is your feature request related to a problem or challenge?
326 error checks in 65 .slt files put the full error message on the statement error / query error line as an escaped regex, which is hard to read and review:
statement error DataFusion error: This feature is not implemented: WITH \[NO\] DATA not supported
CREATE TABLE foo AS SELECT 1 WITH NO DATA;
As plain text after ----, the same check is exact and readable:
statement error
CREATE TABLE foo AS SELECT 1 WITH NO DATA;
----
DataFusion error: This feature is not implemented: WITH [NO] DATA not supported
#27217 documents this form in the sqllogictest README, and #27218 asks --complete to write it for new records. Neither changes existing lines, because --complete leaves a regex that still matches alone. This issue is about converting the existing lines.
Describe the solution you'd like
For each line listed by this command:
git grep -nE '^(statement|query) error DataFusion error: .*\\[][(){}.+*?^$|]' -- 'datafusion/sqllogictest/test_files/*.slt'- Remove the message from the
statement error/query errorline, and add----and two blank lines after the SQL. With only one blank line, the next record becomes part of the expected error and--completedeletes it. - Run
cargo test --test sqllogictests -- <file> --complete. - Keep the new block only if its message equals the old regex with the escapes removed. If it differs, the regex matched part of the message on purpose, so restore the old line. For example,
ddl.slt:704uses.*for a local path. - Check
git diff: only the converted records should change. Start from a file that passes, because--completealso rewrites any other failing record.
Several small PRs (about 5 to 10 files each) are easier to review and conflict less: 36 open PRs touch 21 of these files today. Please comment here with the files you're taking.
The 75 other escaped lines don't start with DataFusion error:, so they match only part of a message. Leave them as they are.
Describe alternatives you've considered
- One PR for all 65 files: a harder review, and more conflicts with open PRs.
- Waiting for Make sqllogictest
--completewrite expected errors as plain text #27218: it changes only what--completewrites for failing records, so existing lines that pass stay as they are.
Additional context
Follow-up to #27217.
The steps above, tried on ddl.slt (7 lines)
4 lines converted cleanly, for example:
-statement error DataFusion error: Execution error: Catalog 'cat' doesn't exist\.
+statement error
drop catalog cat;
+----
+DataFusion error: Execution error: Catalog 'cat' doesn't exist.
+The 3 No files found at .* lines were filled with the local path (file:///.../test_files/scratch/ddl/empty_dir/), so step 3 restores them.
Willingness to contribute
I'm not planning to work on this myself, so anyone is welcome to pick it up. Feel free to ping me with questions or when you'd like a review.
Activity
Goldloli commentedon Nov 8, 2026
Taking a first batch of 8 files:
(including ddl.slt to cover the
.*local-path case called out in the issue, which I'll leave as is)kutluhaneth46 commentedon Nov 9, 2026
Taking a batch of 8 files:
itang06 commentedon Nov 9, 2026
Taking a batch of 5 files
datafusion/sqllogictest/test_files/scalar.sltdatafusion/sqllogictest/test_files/explain.sltdatafusion/sqllogictest/test_files/order.sltdatafusion/sqllogictest/test_files/select.sltdatafusion/sqllogictest/test_files/joins.sltI'll convert the full-message checks to plain text and keep the regexes that intentionally match only part of an error.
ETS2K7 commentedon Nov 9, 2026
Taking a batch of 3 files:
I'll convert the full-message checks to plain text under
----and leave partial-match regexes alone. Skipping identifiers.slt since #27265 already has the same conversion for it.ETS2K7 commentedon Nov 10, 2026
Unclaiming
cte.slt,distinct_on.slt, andident_normalization.slt(#27270 closed) so others can pick them up.Convert escaped error checks to plain text in five sqllogictest files (…
cblp commentedon Nov 11, 2026
Taking a batch of 5 files:
datafusion/sqllogictest/test_files/datetime/date_part.sltdatafusion/sqllogictest/test_files/datetime/interval.sltdatafusion/sqllogictest/test_files/datetime/dates.sltdatafusion/sqllogictest/test_files/datetime/interval_mysql.sltdatafusion/sqllogictest/test_files/datetime/arith_interval_double.sltI'll convert the full-message checks to plain text and keep the regexes that intentionally match only part of an error.
chinmaydwivedi commentedon Nov 12, 2026
Taking one file:
datafusion/sqllogictest/test_files/datetime/timestamps.slt(the other datetime files are covered by #27336).It has 12 matching lines. I'll convert the 7 where the regex is the whole message and leave the 5 that only match part of it.
test: convert escaped-regex error checks to plain text in four sqllog…
test: rewrite escaped-regex error checks as plain text (apache#27239)
Inf1mum commentedon Nov 12, 2026
Working on the escaped-regex rewrite for encoding.slt and expr.slt.
Inf1mum commentedon Nov 12, 2026
Unclaiming
encoding.sltandexpr.slt. All 4 matching lines (encoding.slt 65, 68, 83 and expr.slt 608) fail step 3 of the recipe: the actual error is longer than the old regex. For example,select encode(12, 'hex');now fails withand
decode(encoding.slt 68),to_hex(encoding.slt 83), andrepeat(expr.slt 608) have the same appended signature text. The inline regexes match only a prefix of these messages, so the plain-text record cannot equal the old regex with the escapes removed. The appended "No function matches …" text and these exact slt lines both go back to #20605, so the regexes have been prefix-matches ever since. Converting them would mean rewriting the checks to the full multi-line message rather than a mechanical rewrite, so I'm releasing the claim instead of opening an empty PR.Convert escaped-regex error checks to plain text in timestamps.slt (a…
test: rewrite escaped-regex error checks as plain text (apache#27239)
PrajwalAmte commentedon Nov 22, 2026
Taking a small first batch to learn the recipe and CI flow:
datafusion/sqllogictest/test_files/cte.slt
datafusion/sqllogictest/test_files/distinct_on.slt
datafusion/sqllogictest/test_files/ident_normalization.slt
I’ll convert only the error checks where the escaped regex is the whole message, and leave partial-match regexes as they are. I’ll check each rewritten error against the actual output of cargo test --test sqllogictests before opening the PR. I’ll keep this to one PR per batch.
(I saw these were unclaimed after #27270 was closed. If there’s a reason that PR was closed, such as a reviewer preference, please tell me and I’ll adjust.)
kush-manish commentedon Nov 25, 2026
Taking a batch of 5 files (opened #27762):
datafusion/sqllogictest/test_files/eliminate_join_distinct.sltdatafusion/sqllogictest/test_files/map.sltdatafusion/sqllogictest/test_files/predicates.sltdatafusion/sqllogictest/test_files/qualify.sltdatafusion/sqllogictest/test_files/type_coercion.sltInf1mum commentedon Nov 25, 2026
Taking the batch of files that are still free (everything else on the list is covered by an open PR or an unwithdrawn claim):
[\s\S]*to span a multi-part message, so those two stay as they are)I will convert only the checks where the escaped regex is the whole message, and leave partial-match regexes as they are.
Inf1mum commentedon Nov 25, 2026
Releasing my claim above: no free line converts cleanly, so I opened no pull request.
I ran
cargo test --test sqllogictests -- <file> --completeon currentmainfor every unclaimed candidate and restored each record because the real error continues past the old regex (step 3 of the recipe):metadata.slt1064: the real message ends...got metadata: {"metadata_key": "left"}.followed by the two-lineThis issue was likely caused by a bug in DataFusion's code...footer, so the old regex only matches a prefix.scalar.slt2377:Function 'strpos' requires String...continues with.. No function matches the given name and argument types 'strpos(Int64, Int64)'...datetime/timestamps.slt4343, 4616, 5402 (make_date,make_time,to_local_time): same appendedNo function matches ... Candidate functions:text.datetime/timestamps.slt905 and 909 use[\s\S]*to span a multi-part message on purpose, so they stay as they are.That leaves
encoding.slt65/68/83 andexpr.slt608, already known to fail step 3 for the same reason, as the only other unclaimed lines. Every other line on the list is covered by an open pull request or a standing claim.