Tim Armstrong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/14121 )

Change subject: IMPALA-8851: Do not throw authorization exception in drop if 
exists queries
......................................................................


Patch Set 5:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/14121/5/fe/src/main/java/org/apache/impala/analysis/DropTableOrViewStmt.java
File fe/src/main/java/org/apache/impala/analysis/DropTableOrViewStmt.java:

http://gerrit.cloudera.org:8080/#/c/14121/5/fe/src/main/java/org/apache/impala/analysis/DropTableOrViewStmt.java@123
PS5, Line 123:         if (ifExists_) return;
This is counterintuitive - I would expect this to fail if the object exists and 
it doesn't drop it. Not sure that this is the right behaviour. If it is the 
intended behaviour it needs some explanation.

Postgres raises errors in this case:

  postgres=# create table foo(i int);
  CREATE TABLE
  postgres=# drop view if exists foo;
  ERROR:  "foo" is not a view
  HINT:  Use DROP TABLE to remove a table.
  postgres=# create view bar as select * from foo;
  CREATE VIEW
  postgres=# drop table if exists bar;
  ERROR:  "bar" is not a table
  HINT:  Use DROP VIEW to remove a view.
  postgres=# drop table if exists baz;
  NOTICE:  table "baz" does not exist, skipping
  DROP TABLE



--
To view, visit http://gerrit.cloudera.org:8080/14121
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: Iba068935e5da92d71e16e2321afdb8e7b781086a
Gerrit-Change-Number: 14121
Gerrit-PatchSet: 5
Gerrit-Owner: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Csaba Ringhofer <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Tim Armstrong <[email protected]>
Gerrit-Reviewer: Vihang Karajgaonkar <[email protected]>
Gerrit-Comment-Date: Tue, 27 Aug 2019 15:39:56 +0000
Gerrit-HasComments: Yes

Reply via email to