Csaba Ringhofer 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 I did it this way to avoid changing existing behavior. There was a test I broken at my first attempt that threw exception: https://github.com/apache/impala/blob/master/testdata/workloads/functional-query/queries/QueryTest/views-ddl.test#L188 Note the catch clause that was removed at the end of this function - it used to catch AnalysisException and ignore it in the IF EXISTS case. I prefer the new version as it cannot hide exceptions by accident. My approach in this change was that error messages can change, but I shouldn't disallow something that was allowed until now, as that could break existing workflows. ( I can even imagine the current logic to be used to DROP something without knowing whether it is a view or a table - doing both DROP VIEW IF EXISTS and DROP TABLE IF EXISTS would do the job. -- 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:55:53 +0000 Gerrit-HasComments: Yes
