IG-ABHINAV opened a new pull request, #80:
URL: https://github.com/apache/datafusion-spark/pull/80
## What
Port the remaining Spark `.slt` changes from apache/datafusion#27263 ("test:
rewrite escaped-regex error checks as plain text (#27239)") to this repository
— four files:
- `crates/sqllogictest/test_files/url/parse_url.slt`
- `crates/sqllogictest/test_files/map/map_from_arrays.slt`
- `crates/sqllogictest/test_files/map/map_from_entries.slt`
- `crates/sqllogictest/test_files/math/pmod.slt`
## Why
apache/datafusion#27263 rewrites escaped-regex `query error`/`statement
error` expectations as plain text: the expected message moves below the SQL,
after `----`, with no regex escapes. andygrove noted that datafusion-spark#62
already ported most of the Spark `.slt` changes from that PR
(`datetime/add_months.slt`, `math/abs.slt`, `math/negative.slt`,
`string/elt.slt`) and that anything still missing belongs in this repository.
These four files are what remained: single-line error assertions with regex
escapes (`\[DUPLICATED_MAP_KEY\]`, `9999\.8`, `spark\.apache\.org`, …).
## Change
Each affected assertion is converted from
```slt
query error DataFusion error: Execution error: \[DUPLICATED_MAP_KEY\]
Duplicate map key 1 was found
SELECT map_from_arrays(array(1, 2, 1), array('a', 'b', 'c'));
```
to the plain-text form used by the rest of the series and by the
neighbouring assertions:
```slt
query error
SELECT map_from_arrays(array(1, 2, 1), array('a', 'b', 'c'));
----
DataFusion error: Execution error: [DUPLICATED_MAP_KEY] Duplicate map key 1
was found
```
No behaviour change: the same messages are now matched literally instead of
as regexes. Trailing whitespace on a few continuation lines inside one
converted `map_from_entries` statement was dropped as part of the rewrite.
## Test
Scoped runs of the repo's sqllogictest target for the affected files only
(target from `.github/workflows/sqllogictest.yml`; file filter documented in
`crates/sqllogictest/tests/sqllogictests.rs`):
```
export CARGO_HOME=L:/cargo-home-sp GOCACHE=L:/gocache-sp
cargo test -p datafusion-spark-sqllogictest -- 'url\parse_url.slt'
cargo test -p datafusion-spark-sqllogictest -- 'map_from'
cargo test -p datafusion-spark-sqllogictest -- 'math\pmod.slt'
```
**Result: tests deferred to CI.** Two cold-build attempts hit the hard
15-minute local cap before any test executed — attempt 1 (`timeout 900`,
default profiles) died while fetching the crates.io index and the
`apache/datafusion` git dependency; attempt 2 (retry with
`CARGO_PROFILE_DEV_DEBUG=line-tables-only
CARGO_PROFILE_TEST_DEBUG=line-tables-only CARGO_INCREMENTAL=0`, `timeout 880`)
got past dependency resolution but was still downloading crates when it hit the
cap. No test binary ever ran locally, so I am not claiming a local pass — the
three commands above are the scoped checks CI should run for this change.
## Judgement call
- Assertions without regex escapes in the same files (e.g. `query error
DataFusion error: Execution error: InvalidPort` in `parse_url.slt`, the
divide-by-zero `statement error`s in `pmod.slt`) were left untouched: they are
not part of this change series, and touching them would widen the diff beyond
the ported delta.
- `url_decode.slt`/`base64.slt` and the other files in this repo that still
contain escaped error checks were not in the set of Spark files removed from
apache/datafusion#27263, so they are out of scope here.
--
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]