[
https://issues.apache.org/jira/browse/HIVE-13748?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17943758#comment-17943758
]
Shohei Okumiya edited comment on HIVE-13748 at 4/12/25 7:42 AM:
----------------------------------------------------------------
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> SHOW CREATE TABLE test_struct;
...
+----------------------------------------------------+
| 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}
was (Author: okumin):
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)