Alex Behm has posted comments on this change. ( http://gerrit.cloudera.org:8080/8448 )
Change subject: IMPALA-6114: Require type equality of NumericLiteral::localEquals(). ...................................................................... Patch Set 5: (2 comments) http://gerrit.cloudera.org:8080/#/c/8448/5/fe/src/main/java/org/apache/impala/analysis/NullLiteral.java File fe/src/main/java/org/apache/impala/analysis/NullLiteral.java: http://gerrit.cloudera.org:8080/#/c/8448/5/fe/src/main/java/org/apache/impala/analysis/NullLiteral.java@51 PS5, Line 51: public boolean localEquals(Expr that) { I looked into this a little deeper and concluded that it's safe to consider NullLiterals equal regardless of type. The reason is that a NullLiteral is compatible with any other type and can be cast to any other type. So let's revert this change. Sorry for the back-and-forth. http://gerrit.cloudera.org:8080/#/c/8448/5/fe/src/test/java/org/apache/impala/analysis/AnalyzeExprsTest.java File fe/src/test/java/org/apache/impala/analysis/AnalyzeExprsTest.java: http://gerrit.cloudera.org:8080/#/c/8448/5/fe/src/test/java/org/apache/impala/analysis/AnalyzeExprsTest.java@2586 PS5, Line 2586: AnalyzesOk(String.format("select distinct cast(0 as decimal(14)), 0 from " + > Add a test that covers the NullLiteral change * Test is misplaced. Let's move it into AnalyzeStmtsTest#TestDistinct * Simplify test: No need for String.format() and no need to pass in a custom analyzer with queryOptions. * Typically we prefix an issue with the JIRA, e.g.: IMPALA-6144: Test that numeric... -- To view, visit http://gerrit.cloudera.org:8080/8448 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia88d54088dfd128b103759dc01103b6c35bf6257 Gerrit-Change-Number: 8448 Gerrit-PatchSet: 5 Gerrit-Owner: Zoram Thanga <zo...@cloudera.com> Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com> Gerrit-Reviewer: Bharath Vissapragada <bhara...@cloudera.com> Gerrit-Reviewer: Dimitris Tsirogiannis <dtsirogian...@cloudera.com> Gerrit-Reviewer: Michael Ho <k...@cloudera.com> Gerrit-Reviewer: Zoram Thanga <zo...@cloudera.com> Gerrit-Comment-Date: Thu, 14 Dec 2017 07:09:07 +0000 Gerrit-HasComments: Yes