Repository navigation
Closed
Labels
area:expressionsExpression evaluationExpression evaluationenhancementNew feature or requestNew feature or requestpriority:lowMinor issues, test failures, tooling, cosmeticMinor issues, test failures, tooling, cosmetic
Description
Summary
CometCast.isSupported claims support for several complex-type cast operations that are not currently exercised in CometCastSuite. This epic tracks the remaining gaps. Replaces #2766, which is partially out of date (Array → Array and most Struct → Struct cases are now covered).
Already covered (do not refile)
cast ArrayType to StringTypefor Bool/String/Byte/Int/Long/Short/Decimal element types:CometCastSuite:1545cast ArrayType to ArrayTypefull primitive matrix incl. Date/Timestamp/Binary, with empty/null/edge-case rows:CometCastSuite:1570cast StructType to StringType,StructType to StructType(incl. renamed fields):CometCastSuite:1442-1503
Gaps to close
Array element types not covered
-
Array(Float)andArray(Double)→ String (currently commented out atCometCastSuite:1560; reinstate or document the reason) -
Array(Binary)→ String (markedIncompatibleinCometCast.scala:154; add a documenting test that asserts fallback) -
Array(TimestampNTZ)→ String,Array(TimestampNTZ)→Array(other)
Array of Date negative case
-
Array(Date)→Array(Long)/Array(Boolean)/etc. should fall back perCometCast.scala:151-153. Add a negative test.
Nested complex types
-
Array(Struct(...))→Array(Struct(...))with field type changes -
Array(Struct(...))→ String -
StructwithArrayfield →StructwithArrayfield (cast on inner element type) - Deep nesting (>2 levels) for
Struct(Struct(...))→Struct(Struct(...))and → String - Note: nested
Array → Array(e.g.Array(Array(Int))→Array(Array(String))) is already tracked by Enable testcast nested ArrayType to nested ArrayType#3906; do not duplicate here.
Eval-mode coverage
- ANSI / TRY mode for
Struct → StructandStruct → Stringcasts (only LEGACY is currently exercised) - ANSI overflow paths for array element casts (e.g.
Array(Long)→Array(Byte)with overflowing values)
Map type
-
CometCast.isSupportedhas noMapTypebranch: map casts silently fall through to the catch-allUnsupported. Add either an explicitUnsupportedarm with a clear reason, or an implementation. Filed as a sibling issue once direction is decided. Documentingignored tests in the meantime is acceptable.
Out of scope
- Map cast implementation: separate decision, separate issue.
- Nested
Array → Array: tracked in Enable testcast nested ArrayType to nested ArrayType#3906.
Metadata
Metadata
Assignees
Labels
area:expressionsExpression evaluationExpression evaluationenhancementNew feature or requestNew feature or requestpriority:lowMinor issues, test failures, tooling, cosmeticMinor issues, test failures, tooling, cosmetic
Activity