MaxGekk opened a new pull request, #56613:
URL: https://github.com/apache/spark/pull/56613

   ### What changes were proposed in this pull request?
   
   Add a `TimeType` branch (via the abstract `AnyTimeType`) to 
`RowToColumnConverter.getConverterForType` in 
`sql/core/.../execution/Columnar.scala`, routing TIME columns through the 
long-backed `LongConverter` path. TIME is stored as nanos-of-day `Long`, and 
the on/off-heap column vectors already reserve long storage for it 
(`OnHeapColumnVector`, `OffHeapColumnVector`), so no column-vector changes are 
required.
   
   ### Why are the changes needed?
   
   Previously `getConverterForType` handled `LongType | TimestampType | 
TimestampNTZType | DayTimeIntervalType` (all long-backed) but had no `TimeType` 
case, so a TIME column fell through to `unsupportedDataTypeError`. This blocked 
row-to-column conversion paths (e.g. `RowToColumnar` transitions, vectorized 
execution) for the TIME data type.
   
   This is a sub-task of 
[SPARK-57550](https://issues.apache.org/jira/browse/SPARK-57550) (Extend 
support for the TIME data type).
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. It enables an existing code path for the TIME data type that previously 
threw an unsupported-type error.
   
   ### How was this patch tested?
   
   Added round-trip and null-handling tests for `TimeType` to 
`RowToColumnConverterSuite`:
   - `TimeType column roundtrip` (precisions 0, 3, 6; values including `0L` and 
end-of-day `86399999999999L`)
   - `TimeType column with nulls`
   
   Ran `build/sbt 'sql/testOnly *RowToColumnConverterSuite'` (all 13 tests 
pass) and scalastyle on the sql module (0 errors).
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Yes, Generated-by: Cursor.


-- 
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]

Reply via email to