为 HIVE 中现有的物理列创建分区

问题描述 投票:0回答:1

是否可以创建一个分区列作为HIVE中表列之一的表?

例如:创建表 test (a int, b string, c int),由 (c int) 分区

运行上述代码时,会出现此错误“编译语句时出错:FAILED:SemanticException [错误 10035]:分区列中重复列”

hive
1个回答
0
投票

这是可能的,你几乎是正确的。正确的语法是 -

create table test (a int, b string) partitioned by (c int)
© www.soinside.com 2019 - 2024. All rights reserved.