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

Shohei Okumiya commented on HIVE-13748:
---------------------------------------

I found this causes a bit odd behavior when using Iceberg.
{code:java}
trino> CREATE TABLE iceberg.default.test_struct (obj ROW("a-b" DOUBLE));
CREATE TABLE {code}
{code:java}
0: jdbc:hive2://hive-hiveserver2:10000/defaul> trino> CREATE TABLE 
iceberg.default.test_struct (obj ROW("a-b" DOUBLE));
...
+----------------------------------------------------+
|                   createtab_stmt                   |
+----------------------------------------------------+
| CREATE EXTERNAL TABLE `test_struct`(               |
| )                                                  |
| ROW FORMAT SERDE                                   |
|   'org.apache.iceberg.mr.hive.HiveIcebergSerDe'    |
| STORED BY                                          |
|   'org.apache.iceberg.mr.hive.HiveIcebergStorageHandler'  |
...
0: jdbc:hive2://hive-hiveserver2:10000/defaul> SELECT * FROM test_struct;
Error: Error while compiling statement: FAILED: IllegalArgumentException Error: 
: expected at the position 8 of 'struct<a-b:double>' but '-' is found.; Query 
ID: hive_20250412074016_422a457e-5a12-4b4a-b255-434db0feeeab 
(state=42000,code=40000){code}

> TypeInfoParser cannot handle the dash in the field name of a complex type
> -------------------------------------------------------------------------
>
>                 Key: HIVE-13748
>                 URL: https://issues.apache.org/jira/browse/HIVE-13748
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Chaoyu Tang
>            Assignee: Chaoyu Tang
>            Priority: Minor
>
> hive> create table y(col struct<`a-b`:double> COMMENT 'type field has a 
> dash');
> FAILED: Execution Error, return code 1 from 
> org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.IllegalArgumentException: 
> Error: : expected at the position 8 of 'struct<a-b:double>' but '-' is found.



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

Reply via email to