melin opened a new issue, #5687:
URL: https://github.com/apache/hudi/issues/5687
example:
> spark.sql.ansi.enabled = true
select CAST(-123456789 AS TIMESTAMP) as de, exception:
```
Exception in thread "main" org.apache.spark.sql.AnalysisException: cannot
resolve 'CAST(-123456789 AS TIMESTAMP)' due to data type mismatch: cannot cast
int to timestamp.
To convert values from int to timestamp, you can use functions
TIMESTAMP_SECONDS/TIMESTAMP_MILLIS/TIMESTAMP_MICROS instead.
; line 1 pos 7;
'Project [ansi_cast(-123456789 as timestamp) AS de#0]
+- OneRowRelation
```
add hudi, exception:
```
no viable alternative at input 'TIMESTAMP'(line 1, pos 26)
== SQL ==
select CAST(-123456789 AS TIMESTAMP) as de
--------------------------^^^
at
org.apache.spark.sql.catalyst.parser.ParseException.withCommand(ParseDriver.scala:266)
at
org.apache.spark.sql.parser.HoodieSpark3_2ExtendedSqlParser.parse(HoodieSpark3_2ExtendedSqlParser.scala:97)
at
org.apache.spark.sql.parser.HoodieSpark3_2ExtendedSqlParser.parsePlan(HoodieSpark3_2ExtendedSqlParser.scala:41)
at
org.apache.spark.sql.parser.HoodieCommonSqlParser.$anonfun$parsePlan$1(HoodieCommonSqlParser.scala:44)
at
org.apache.spark.sql.parser.HoodieCommonSqlParser.parse(HoodieCommonSqlParser.scala:84)
at
org.apache.spark.sql.parser.HoodieCommonSqlParser.parsePlan(HoodieCommonSqlParser.scala:41)
at
org.apache.spark.sql.SparkSession.$anonfun$sql$2(SparkSession.scala:616)
at
org.apache.spark.sql.catalyst.QueryPlanningTracker.measurePhase(QueryPlanningTracker.scala:111)
at
org.apache.spark.sql.SparkSession.$anonfun$sql$1(SparkSession.scala:616)
at org.apache.spark.sql.SparkSession.withActive(SparkSession.scala:775)
at org.apache.spark.sql.SparkSession.sql(SparkSession.scala:613)
at org.example.hudi.HudiSqlExample$.main(HudiSqlExample.scala:19)
at org.example.hudi.HudiSqlExample.main(HudiSqlExample.scala)
```
--
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]