hive添加分区报错 mismatched input 'add' expecting KW_EXCHANGE near 'table' in

It's not exactly a bug, just a side effect of Open Source when it's done by a motley crew of people all around the world with no "product owner" and no incentives to use a common programming style (or run extensive regression tests, or ).

在HiveQL中,alter命令不使用与create或select相同的语义 ; 

具体来说,您不能使用“ALTER DATABASE.TABLE”表示法。如果您尝试,那么HQL解析器就会失败并显示一条奇怪的错误消息。

你只需要alter tablename  即可,  不需要带database。

你可能感兴趣的:(hive数仓)