You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "Vihang Karajgaonkar (Jira)" <ji...@apache.org> on 2020/12/23 19:20:00 UTC
[jira] [Resolved] (IMPALA-2458) DESCRIBE before altering Hive
metadata allows Impala to add conflicting columns
[ https://issues.apache.org/jira/browse/IMPALA-2458?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vihang Karajgaonkar resolved IMPALA-2458.
-----------------------------------------
Fix Version/s: Impala 3.2.0
Resolution: Fixed
> DESCRIBE before altering Hive metadata allows Impala to add conflicting columns
> -------------------------------------------------------------------------------
>
> Key: IMPALA-2458
> URL: https://issues.apache.org/jira/browse/IMPALA-2458
> Project: IMPALA
> Issue Type: Bug
> Components: Catalog
> Affects Versions: Impala 2.3.0
> Reporter: Jim Apple
> Priority: Minor
> Labels: catalog-server
> Fix For: Impala 3.2.0
>
>
> {code:none}
> #!/bin/sh
> # Using DESCRIBE on a table created in Impala allows Impala to later
> # add a column with a name that conflicts with the name of a column
> # already added in Hive
> impala-shell.sh -q 'create database foo; create table foo.bar (x int, y int); DESCRIBE foo.bar'
> beeline -u jdbc:hive2://localhost:11050 -n $(whoami) -e 'alter table foo.bar add columns (z int)'
> # I don't expect this should work
> impala-shell.sh -q 'alter table foo.bar add columns (z string)'
> # Given that it does work, I would expect that the first DESCRIBE was
> # nilpotent. However, if we don't do it, Impala prevents the addition
> # of the conflicting column.
> impala-shell.sh -q 'drop database foo cascade'
> # Note: no DESCRIBE here now.
> impala-shell.sh -q 'create database foo; create table foo.bar (x int, y int)'
> beeline -u jdbc:hive2://localhost:11050 -n $(whoami) -e 'alter table foo.bar add columns (z int)'
> impala-shell.sh -q 'alter table foo.bar add columns (z string)'
> impala-shell.sh -q 'drop database foo cascade'
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)