You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Burak Yavuz (Jira)" <ji...@apache.org> on 2020/02/13 18:44:00 UTC
[jira] [Created] (SPARK-30814) Add Columns references should be
able to resolve each other
Burak Yavuz created SPARK-30814:
-----------------------------------
Summary: Add Columns references should be able to resolve each other
Key: SPARK-30814
URL: https://issues.apache.org/jira/browse/SPARK-30814
Project: Spark
Issue Type: Bug
Components: SQL
Affects Versions: 3.0.0
Reporter: Burak Yavuz
In ResolveAlterTableChanges, we have checks that make sure that positional arguments exist and are normalized around case sensitivity for ALTER TABLE ADD COLUMNS. However, we missed the case, where a column in ADD COLUMNS can depend on the position of a column that is just being added.
For example for the schema:
{code:java}
root:
- a: string
- b: long
{code}
The following should work:
{code:java}
ALTER TABLE ... ADD COLUMNS (x int AFTER a, y int AFTER x) {code}
Currently, the above statement will throw an error saying that AFTER x cannot be resolved, because x doesn't exist yet.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org