rich7420 opened a new pull request, #7831:
URL: https://github.com/apache/datafusion-comet/pull/7831
## Which issue does this PR close?
Part of #6634. Decimal hash and bitwise migrations remain separate.
## Rationale for this change
Move nested `hash` and `xxhash64` coverage from `CometHashExpressionSuite`
into the SQL test framework so Spark parity and Rust-implemented execution are
verified without duplicate Scala setup. There are no production code changes
and no behavior change relative to `branch-1.2`.
## What changes are included in this PR?
- Add `spark/src/test/resources/sql-tests/expressions/hash/hash_nested.sql`
covering the 17 nested hash tests and the two `#5778` array-of-struct tests
from `CometHashExpressionSuite`:
- Primitive, nested, and 1,000-element arrays (`INT`, `STRING`, `DOUBLE`
including `-0.0` and `NaN`, `ARRAY<ARRAY<INT>>`) read from Parquet, with
`parquet.enable.dictionary` toggled via `SET` and `RESET` on `ARRAY<STRING>`.
- Flat, nested, array-containing, and four-level structs.
- Primitive and complex-value maps under
`spark.sql.legacy.allowHashOnMapType=true`, covering both null-aware and
null-free recursive map loops.
- Multi-column chaining with arrays and structs in both child orders,
non-null empty strings and arrays, and a single-row all-NULL file.
- Batched and per-element `ARRAY<STRUCT>` hashing paths (mixed lengths,
uniform lengths, nested struct fields, and zero-element batches).
- Assert `expect_native(hash, xxhash64)` on every query to reject both Spark
fallback and codegen dispatch.
- Remove the 19 corresponding Scala tests from `CometHashExpressionSuite`,
retaining the five decimal hash tests and the fuzz test.
## How are these changes tested?
Fresh native build (`make core`) and root-reactor Maven runs:
- Spark 3.5.9, 4.0.4, 4.1.3, and 4.2.0: `CometSqlFileTestSuite
expressions/hash/` (9 tests) and `CometHashExpressionSuite` (6 tests) passed
(15/15 on each profile).
- `-Pspark-3.5,delta -Pstrict-warnings`, Scalastyle, Spotless,
`dev/ci/check-suites.py`, and `dev/release/check-rat.sh HEAD` passed.
- Local probes confirmed `SET parquet.enable.dictionary=true`/`false` writes
`PLAIN_DICTIONARY` vs `PLAIN` Parquet pages and verified the targeted Rust
null-free and recursive hash branches execute.
--
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]