Brijesh-Thakkar opened a new pull request, #2990:
URL: https://github.com/apache/datafusion-comet/pull/2990
# PR Description
## Which issue does this PR close?
Closes #2743
## Rationale for this change
Comet already provides native support for a subset of cast operations
involving complex types such as STRUCT and ARRAY, but this behavior was not
documented in the compatibility guide. As a result, users may be unaware of
which complex type casts are supported natively and which may fall back to
Spark.
This change improves the accuracy and completeness of the documentation by
explicitly describing the currently supported complex type casts and their
limitations, based on existing behavior and tests.
## What changes are included in this PR?
- Added a new "Complex Type Casts" section to the compatibility guide
- Documented support for:
- `STRUCT` → `STRING` (including named structs, nested structs, and
structs containing primitive, decimal, date, and timestamp fields)
- `STRUCT` → `STRUCT` (field matching by position)
- `ARRAY<T>` → `STRING` (for element types: boolean, byte, short, integer,
long, string, decimal)
- `BINARY` → `STRING` (for valid UTF-8 data)
- `STRING` → `BINARY`
- Described known limitations and Spark fallback behavior for other complex
type casts
## How are these changes tested?
This PR only updates documentation. The documented behavior is verified
against existing tests in `CometCastSuite.scala`, which cover the supported
complex type cast operations:
- `test("cast StructType to StringType")` - lines 1090-1110
- `test("cast StructType to StructType")` - lines 1112-1123
- `test("cast StructType to StructType with different names")` - lines
1125-1141
- `test("cast ArrayType to StringType")` - lines 1164-1184
- `test("cast BinaryType to StringType")` - lines 895-897
- `test("cast StringType to BinaryType")` - lines 847-849
No new tests are required for this documentation-only change.
--
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]