Stevo Mitric created SPARK-58737:
------------------------------------

             Summary: Support nanosecond-precision timestamps in 
ColumnarRow/ColumnarBatchRow copy() and get()
                 Key: SPARK-58737
                 URL: https://issues.apache.org/jira/browse/SPARK-58737
             Project: Spark
          Issue Type: Task
          Components: Spark Core
    Affects Versions: 4.4.0
            Reporter: Stevo Mitric


The generic type-dispatch in ColumnarRow and ColumnarBatchRow 
(sql/catalyst/.../vectorized/) does not handle the nanosecond-precision 
timestamp types TimestampNTZNanosType(p) / TimestampLTZNanosType(p) (p in [7, 
9], carried as org.apache.spark.unsafe.types.TimestampNanosVal).

As a result, copy() and get(int, DataType) throw at runtime on a nanosecond 
timestamp column:
- copy() dispatches on PhysicalDataType and falls through to 
RuntimeException("Not implemented. " + dt).
- get(int, DataType) dispatches on DataType and throws 
SparkUnsupportedOperationException (_LEGACY_ERROR_TEMP_3155 in ColumnarRow, 
_LEGACY_ERROR_TEMP_3152  in ColumnarBatchRow).
  
The per-cell leaf accessors (getTimestampNTZNanos / getTimestampLTZNanos) 
already exist and work; only these two generic dispatch methods were never 
extended.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to