andygrove opened a new pull request, #4021: URL: https://github.com/apache/datafusion-comet/pull/4021
## Which issue does this PR close? Closes #. ## Rationale for this change Comet does not support Spark 4.0's `VARIANT` data type, so scans exposing a VariantType column must fall back to Spark. There is no regression test pinning this behavior today. If a future change silently lets a VariantType column through the scan, we would only notice through runtime errors or wrong results. A targeted sql-file test locks in the fallback contract. ## What changes are included in this PR? - New file `spark/src/test/resources/sql-tests/expressions/misc/variant.sql` - Gated with `-- MinSparkVersion: 4.0` so it is skipped on Spark 3.4 / 3.5 via `CometSqlFileTestSuite` - Creates parquet-backed tables with a `VARIANT` column (directly and nested inside `STRUCT<v: VARIANT>`), populated via `parse_json` - Uses `query expect_fallback(Unsupported v of type VariantType)` on five queries covering projection, `variant_get` extraction, `variant_get` in a predicate, a `COUNT(*)` with a not-null filter, and a struct-containing-variant projection ## How are these changes tested? Ran the new test under the Spark 4.0 profile: ``` ./mvnw test -Pspark-4.0 -Dsuites="org.apache.comet.CometSqlFileTestSuite variant" -Dtest=none ``` All five queries in the file fall back with the expected reason and the suite reports `Tests: succeeded 1, failed 0`. -- 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]
