dcoliversun commented on issue #5102:
URL:
https://github.com/apache/incubator-gluten/issues/5102#issuecomment-2031026597
@rui-mo cast date as timestamp is ok. I will update this pr soon.
```shell
scala> val df1 = spark.sql("select cast(dateColumn as timestamp) from view")
df1: org.apache.spark.sql.DataFrame = [dateColumn: timestamp]
scala> df1.explain
== Physical Plan ==
VeloxColumnarToRowExec
+- ^(3) ProjectExecTransformer [cast(dateColumn#0 as timestamp) AS
dateColumn#10]
+- ^(3) NativeFileScan parquet [dateColumn#0] Batched: true, DataFilters:
[], Format: Parquet, Location: InMemoryFileIndex(1 paths)[file:/opt/data],
PartitionFilters: [], PushedFilters: [], ReadSchema: struct<dateColumn:date>
scala> df1.show
+-------------------+
| dateColumn|
+-------------------+
|2023-01-01 00:00:00|
|2023-01-03 00:00:00|
|2023-01-02 00:00:00|
+-------------------+
scala> df1.schema
res5: org.apache.spark.sql.types.StructType =
StructType(StructField(dateColumn,TimestampType,true))
```
--
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]