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

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

问题描述

我们有 Spark 2.1Thrift 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

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

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