本文介绍了不允许的操作:alter table add columns(line 1, pos 0)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我们有 Spark 2.1
、Thrift JDBC/ODBC
服务器,配置了 Hive 2.1.1
并使用 Beeline
.
DDL 语句如
创建表,创建类似的表,创建类似的表,改变表集TBL属性
效果很好.
但是 ALTER TABLE ADD COLUMNS
失败
create table tbl1 (id int, c1 string, c2 string);更改表 tbl1 添加列(c3 字符串);
错误:org.apache.spark.sql.catalyst.parser.ParseException:操作不允许:alter table add columns(line 1, pos 0)
== SQL == alter table tbl1 添加列(c3 字符串)^^^ (state=,code=0)
任何提示将不胜感激
解决方案
看起来这是 Spark v2.x 的工作中
https://issues.apache.org/jira/browse/SPARK-19261
We have Spark 2.1
, Thrift JDBC/ODBC
server configured with Hive 2.1.1
and using Beeline
.
DDL statements like
works well.
But ALTER TABLE ADD COLUMNS
fails
create table tbl1 (id int, c1 string, c2 string);
alter table tbl1 add columns (c3 string);
Any hint would be appreciated
解决方案
Looks like this is work in progress for Spark v2.x
https://issues.apache.org/jira/browse/SPARK-19261
这篇关于不允许的操作:alter table add columns(line 1, pos 0)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!