Yupsecous opened a new pull request, #27248:
URL: https://github.com/apache/datafusion/pull/27248

   ## Which issue does this PR close?
   
   - Part of #27239: the Spark function files.
   
   ## Rationale for this change
   
   Per #27239: an escaped regex on the `statement error` / `query error` line 
is hard to read and review. The plain-text form after `----` is exact and 
readable.
   
   ## What changes are included in this PR?
   
   Converts 19 error records in 4 files:
   
   | file | converted | kept as regex (on purpose) |
   |---|---|---|
   | test_files/spark/math/abs.slt | 8 | none |
   | test_files/spark/math/negative.slt | 5 | none |
   | test_files/spark/string/elt.slt | 5 | none |
   | test_files/spark/datetime/add_months.slt | 1 | none |
   
   I also went through three more Spark files, and they stay unchanged because 
their regex matches only the start of the error on purpose:
   
   - `spark/math/pmod.slt` (1 record): the error goes on with `in a Decimal128 
of precision 3. Max is 99.9`.
   - `spark/map/map_from_entries.slt` and `spark/map/map_from_arrays.slt` (4 
records each): the error goes on with `, please check the input data. To allow 
duplicate keys with last-value-wins ...`.
   
   ## What is the testing strategy for this PR?
   
   - All 7 files passed on `main` (52a8cd947) before the change.
   - I followed the steps in the issue for each record: I removed the message, 
added `----` and two blank lines after the SQL, and ran `cargo test --test 
sqllogictests -- <file> --complete`. I kept a block only when its message 
equals the old regex with the escapes removed, and restored the old line 
otherwise. `git diff` shows only the converted records.
   - `cargo test --test sqllogictests -- spark` passes (245 files), both on the 
first base and after the rebase onto `main` (32dd1d2c5).
   - To confirm that the plain-text blocks are really checked, I changed one 
converted message in `spark/math/abs.slt` (`SQLSTATE: 22003` to `22004`). The 
file then fails with an expected/actual mismatch.
   
   ## Are there any user-facing changes?
   
   No. Test files only.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to