Hive Apache配置单元:重命名数组类型的列<;结构<&燃气轮机&燃气轮机;
我有一个事务表,它说:Hive Apache配置单元:重命名数组类型的列<;结构<&燃气轮机&燃气轮机;,hive,hiveql,Hive,Hiveql,我有一个事务表,它说: CREATE TABLE Test( `name` string, `tracking_id` string, `actions` array<struct<call:string,score:int,decision:string>>) PARTITIONED BY ( `year` int, `month` int
CREATE TABLE Test(
`name` string,
`tracking_id` string,
`actions` array<struct<call:string,score:int,decision:string>>)
PARTITIONED BY (
`year` int,
`month` int,
`day` int)
CLUSTERED BY (
tracking_id)
INTO 6 BUCKETS
STORED AS ORC
TBLPROPERTIES (
'orc.compress'='ZLIB',
'orc.compression.strategy'='SPEED',
'orc.create.index'='true',
'orc.encoding.strategy'='SPEED',
'transactional'='true');
现在我想将列actions
重命名为play
altertable测试更改动作播放数组代码>
现在,如果我运行时从测试限制1中选择play(播放)
+-------+--+
| play |
+-------+--+
| NULL |
+-------+--+
这有什么原因吗?如何简单地重命名列?我们将使用复杂类型更改列,在示例中,您共享的是具有复杂数据类型的列
注:复杂类型
arrays: ARRAY<data_type>
maps: MAP<primitive_type, data_type>
structs: STRUCT<col_name : data_type >
union: UNIONTYPE<data_type, data_type, ...>
数组:数组
地图:地图
结构:结构
联合:联合类型
arrays: ARRAY<data_type>
maps: MAP<primitive_type, data_type>
structs: STRUCT<col_name : data_type >
union: UNIONTYPE<data_type, data_type, ...>