[
https://issues.apache.org/jira/browse/IMPALA-2637?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Gabor Kaszab updated IMPALA-2637:
---------------------------------
Labels: complextype usability (was: usability)
> Can't ALTER TABLE to new database if all columns are complex types
> ------------------------------------------------------------------
>
> Key: IMPALA-2637
> URL: https://issues.apache.org/jira/browse/IMPALA-2637
> Project: IMPALA
> Issue Type: Bug
> Components: Frontend
> Affects Versions: Impala 2.3.0
> Reporter: John Russell
> Priority: Minor
> Labels: complextype, usability
>
> I have a table, NO_SCALAR_TYPES, that I accidentally created in the wrong
> database. Trying to use ALTER TABLE ... RENAME fails with a Hive metastore
> error.
> Another table, COMPLEX_TYPES_TOP_LEVEL, has exactly the same layout but one
> additional column that's a scalar (BIGINT). ALTER TABLE ... RENAME works OK
> for that table.
> Since I noticed we do have some error-handling behavior for SELECT * if all
> the columns are complex types, I figured we should also do something
> user-friendly for ALTER TABLE ... RENAME on the same table.
> {code}
> [localhost:21000] > desc no_scalar_types;
> Query: describe no_scalar_types
> +------+-----------------+---------+
> | name | type | comment |
> +------+-----------------+---------+
> | a | array<int> | |
> | s | struct< | |
> | | field1:int, | |
> | | field2:string | |
> | | > | |
> | m1 | map<int,string> | |
> | m2 | map<string,int> | |
> +------+-----------------+---------+
> [localhost:21000] > alter table no_scalar_types rename to jdr.no_scalar_types;
> Query: alter table no_scalar_types rename to jdr.no_scalar_types
> ERROR:
> ImpalaRuntimeException: Error making 'alter_table' RPC to Hive Metastore:
> CAUSED BY: TProtocolException: Required field 'statsObj' is unset!
> Struct:ColumnStatistics(statsDesc:ColumnStatisticsDesc(isTblLevel:true,
> dbName:jdr, tableName:no_scalar_types), statsObj:null)
> [localhost:21000] > alter table complex_types_top_level rename to
> jdr.complex_types_top_level;
> Query: alter table complex_types_top_level rename to
> jdr.complex_types_top_level
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]