[ 
https://issues.apache.org/jira/browse/SPARK-36949?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17426617#comment-17426617
 ] 

Max Gekk commented on SPARK-36949:
----------------------------------

[~cloud_fan] [~csun] FYI, even if I map Catalyst's ANSI interval types to 
Hive's interval types, the query fails at Hive's side because the method 
doesn't support Hive's intervals:  
https://github.com/apache/hive/blame/master/ql/src/java/org/apache/hadoop/hive/ql/io/parquet/serde/ArrayWritableObjectInspector.java#L94

> Fix CREATE TABLE AS SELECT of ANSI intervals
> --------------------------------------------
>
>                 Key: SPARK-36949
>                 URL: https://issues.apache.org/jira/browse/SPARK-36949
>             Project: Spark
>          Issue Type: Sub-task
>          Components: SQL
>    Affects Versions: 3.3.0
>            Reporter: Max Gekk
>            Priority: Major
>
> The given SQL should work:
> {code:sql}
> spark-sql> CREATE TABLE tbl1 STORED AS PARQUET AS SELECT INTERVAL '1-1' YEAR 
> TO MONTH AS YM;
> 21/10/07 21:35:59 WARN SessionState: METASTORE_FILTER_HOOK will be ignored, 
> since hive.security.authorization.manager is set to instance of 
> HiveAuthorizerFactory.
> Error in query: org.apache.hadoop.hive.ql.metadata.HiveException: 
> java.lang.IllegalArgumentException: Error: type expected at the position 0 of 
> 'interval year to month' but 'interval year to month' is found
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org
For additional commands, e-mail: issues-h...@spark.apache.org

Reply via email to