[jira] [Commented] (IMPALA-7832) Support IF NOT EXISTS in alter table add columns

2023-03-09 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/IMPALA-7832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17698514#comment-17698514
 ] 

ASF subversion and git services commented on IMPALA-7832:
-

Commit 8b375a66a29cfea33a4e418b1fa3b9b5139cf907 in impala's branch 
refs/heads/dependabot/pip/infra/python/deps/wheel-0.38.1 from xiabaike
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=8b375a66a ]

IMPALA-11565: Support IF NOT EXISTS in alter table add columns for kudu/iceberg 
table

Impala already supports IF NOT EXISTS in alter table add columns for
general hive table in IMPALA-7832, but not for kudu/iceberg table.
This patch try to add such semantics for kudu/iceberg table.

Testing:
- Updated E2E DDL tests
- Added fe tests

Change-Id: I82590e5372e881f2e81d4ed3dd0d32a2d3ddb517
Reviewed-on: http://gerrit.cloudera.org:8080/18953
Tested-by: Impala Public Jenkins 
Reviewed-by: Wenzhe Zhou 


> Support IF NOT EXISTS in alter table add columns
> 
>
> Key: IMPALA-7832
> URL: https://issues.apache.org/jira/browse/IMPALA-7832
> Project: IMPALA
>  Issue Type: New Feature
>  Components: Frontend
>Affects Versions: Impala 3.1.0
>Reporter: Thomas Tauber-Marshall
>Assignee: Fredy Wijaya
>Priority: Minor
>  Labels: ramp-up
> Fix For: Impala 3.2.0
>
>
> alter table  add [if not exists] columns (  [,  
> ...])
> would add the column only if a column of the same name does not already exist
> Probably worth checking out what other databases do in different situations, 
> eg. if the column already exists but with a different type, if "replace" is 
> used instead of "add", etc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org



[jira] [Commented] (IMPALA-7832) Support IF NOT EXISTS in alter table add columns

2023-03-02 Thread ASF subversion and git services (Jira)


[ 
https://issues.apache.org/jira/browse/IMPALA-7832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17695841#comment-17695841
 ] 

ASF subversion and git services commented on IMPALA-7832:
-

Commit 8b375a66a29cfea33a4e418b1fa3b9b5139cf907 in impala's branch 
refs/heads/master from xiabaike
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=8b375a66a ]

IMPALA-11565: Support IF NOT EXISTS in alter table add columns for kudu/iceberg 
table

Impala already supports IF NOT EXISTS in alter table add columns for
general hive table in IMPALA-7832, but not for kudu/iceberg table.
This patch try to add such semantics for kudu/iceberg table.

Testing:
- Updated E2E DDL tests
- Added fe tests

Change-Id: I82590e5372e881f2e81d4ed3dd0d32a2d3ddb517
Reviewed-on: http://gerrit.cloudera.org:8080/18953
Tested-by: Impala Public Jenkins 
Reviewed-by: Wenzhe Zhou 


> Support IF NOT EXISTS in alter table add columns
> 
>
> Key: IMPALA-7832
> URL: https://issues.apache.org/jira/browse/IMPALA-7832
> Project: IMPALA
>  Issue Type: New Feature
>  Components: Frontend
>Affects Versions: Impala 3.1.0
>Reporter: Thomas Tauber-Marshall
>Assignee: Fredy Wijaya
>Priority: Minor
>  Labels: ramp-up
> Fix For: Impala 3.2.0
>
>
> alter table  add [if not exists] columns (  [,  
> ...])
> would add the column only if a column of the same name does not already exist
> Probably worth checking out what other databases do in different situations, 
> eg. if the column already exists but with a different type, if "replace" is 
> used instead of "add", etc.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

-
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org



[jira] [Commented] (IMPALA-7832) Support IF NOT EXISTS in alter table add columns

2019-01-24 Thread ASF subversion and git services (JIRA)


[ 
https://issues.apache.org/jira/browse/IMPALA-7832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16751384#comment-16751384
 ] 

ASF subversion and git services commented on IMPALA-7832:
-

Commit bfb9ccc8e02be20fb8b57bae4d55e4094ab7ea3f in impala's branch 
refs/heads/master from Fredy Wijaya
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=bfb9ccc ]

IMPALA-7832: Support for IF NOT EXISTS in ALTER TABLE ADD COLUMN(S)

This patch adds IF NOT EXISTS support in ALTER TABLE ADD COLUMN and
ALTER TABLE ADD COLUMNS. If IF NOT EXISTS is specified and a column
already exists with this name, no error is thrown. If IF NOT EXISTS
is specified for multiple columns and a column already exists, no
error is thrown and a new column that does not exist will be added.

Syntax:
ALTER TABLE tbl ADD COLUMN [IF NOT EXISTS] i int
ALTER TABLE tbl ADD [IF NOT EXISTS] COLUMNS (i int, j int)

Testing:
- Added new FE tests
- Ran all FE tests
- Updated E2E DDL tests
- Ran all E2E DDL tests

Change-Id: I60ed22c8a8eefa10e94ad3dedf32fe67c16642d9
Reviewed-on: http://gerrit.cloudera.org:8080/12181
Reviewed-by: Impala Public Jenkins 
Tested-by: Impala Public Jenkins 


> Support IF NOT EXISTS in alter table add columns
> 
>
> Key: IMPALA-7832
> URL: https://issues.apache.org/jira/browse/IMPALA-7832
> Project: IMPALA
>  Issue Type: New Feature
>  Components: Frontend
>Affects Versions: Impala 3.1.0
>Reporter: Thomas Tauber-Marshall
>Assignee: Fredy Wijaya
>Priority: Minor
>  Labels: ramp-up
> Fix For: Impala 3.2.0
>
>
> alter table  add [if not exists] columns (  [,  
> ...])
> would add the column only if a column of the same name does not already exist
> Probably worth checking out what other databases do in different situations, 
> eg. if the column already exists but with a different type, if "replace" is 
> used instead of "add", etc.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org



[jira] [Commented] (IMPALA-7832) Support IF NOT EXISTS in alter table add columns

2019-01-08 Thread Paul Rogers (JIRA)


[ 
https://issues.apache.org/jira/browse/IMPALA-7832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16737671#comment-16737671
 ] 

Paul Rogers commented on IMPALA-7832:
-

Turns out our existing syntax is:

{noformat}
ALTER TABLE  (REPLACE|ADD) COLUMNS ( ... )
{noformat}

That is, our syntax allows multiple columns per statement, not just one as in 
the ISO SQL. So, we could do two things:

* Add ISO SQL syntax that [~grahn] provided.
* Modify our existing syntax as shown in the original description.

This ensures that we are both SQL-compliant and backward-compatible. I believe 
that the two syntax variations can co-exist, I don't believe that they lead to 
ambiguities, but the parser generator will tell us if they are.

> Support IF NOT EXISTS in alter table add columns
> 
>
> Key: IMPALA-7832
> URL: https://issues.apache.org/jira/browse/IMPALA-7832
> Project: IMPALA
>  Issue Type: New Feature
>  Components: Frontend
>Affects Versions: Impala 3.1.0
>Reporter: Thomas Tauber-Marshall
>Assignee: Fredy Wijaya
>Priority: Minor
>  Labels: ramp-up
>
> alter table  add [if not exists] columns (  [,  
> ...])
> would add the column only if a column of the same name does not already exist
> Probably worth checking out what other databases do in different situations, 
> eg. if the column already exists but with a different type, if "replace" is 
> used instead of "add", etc.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org



[jira] [Commented] (IMPALA-7832) Support IF NOT EXISTS in alter table add columns

2019-01-08 Thread Greg Rahn (JIRA)


[ 
https://issues.apache.org/jira/browse/IMPALA-7832?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16737655#comment-16737655
 ] 

Greg Rahn commented on IMPALA-7832:
---

The ANSI SQL standard syntax for this would be:
{noformat}
ALTER TABLE [ IF EXISTS ] ADD [ COLUMN ] [ IF NOT EXISTS ] column_name 
data_type [ COLLATE collation ] [ column_constraint [ ... ] ]
{noformat}
For example:
{noformat}
alter table t 
add column if not exists c2 int,
add column if not exists c3 int;
{noformat}

> Support IF NOT EXISTS in alter table add columns
> 
>
> Key: IMPALA-7832
> URL: https://issues.apache.org/jira/browse/IMPALA-7832
> Project: IMPALA
>  Issue Type: New Feature
>  Components: Frontend
>Affects Versions: Impala 3.1.0
>Reporter: Thomas Tauber-Marshall
>Assignee: Fredy Wijaya
>Priority: Minor
>  Labels: ramp-up
>
> alter table  add [if not exists] columns (  [,  
> ...])
> would add the column only if a column of the same name does not already exist
> Probably worth checking out what other databases do in different situations, 
> eg. if the column already exists but with a different type, if "replace" is 
> used instead of "add", etc.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

-
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org