不允许操作:alter table add columns(第1行,第0行) [英] Operation not allowed: alter table add columns(line 1, pos 0)

查看:2435
本文介绍了不允许操作:alter table add columns(第1行,第0行)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有配置了 Hive 2.1的 Spark 2.1 Thrift JDBC / ODBC 服务器。 1 并使用直线

DDL语句,例如


CREATE TABLE,CREATE TABLE LIKE,CREATE TABLE LIKE ,ALTER TABLE SET
TBLPROPERTIES


运作良好。



但是 ALTER TABLE ADD COLUMNS 失败

  create table tbl1(id int, c1字符串,c2字符串); 
alter table tbl1添加列(c3字符串);




错误:org.apache.spark.sql.catalyst.parser。 ParseException:操作
不允许:alter table add columns(第1行,pos 0)

== SQL == alter table tbl1 add columns(c3 string) ^^^(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

CREATE TABLE, CREATE TABLE LIKE, CREATE TABLE LIKE, ALTER TABLE SET TBLPROPERTIES

works well.

But ALTER TABLE ADD COLUMNS fails

create table tbl1 (id int, c1 string, c2 string);
alter table tbl1 add columns (c3 string);

Error: org.apache.spark.sql.catalyst.parser.ParseException: Operation not allowed: alter table add columns(line 1, pos 0)

== SQL == alter table tbl1 add columns (c3 string) ^^^ (state=,code=0)

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(第1行,第0行)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆