Thomas Tauber-Marshall has posted comments on this change. ( http://gerrit.cloudera.org:8080/8660 )
Change subject: IMPALA-5929: Remove redundant explicit casts to string ...................................................................... Patch Set 1: (3 comments) http://gerrit.cloudera.org:8080/#/c/8660/1//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/8660/1//COMMIT_MSG@17 PS1, Line 17: Testing: Not super important, since this is clearly a win, but do you have any perf numbers? http://gerrit.cloudera.org:8080/#/c/8660/1/fe/src/main/java/org/apache/impala/rewrite/RemoveRedundantStringCast.java File fe/src/main/java/org/apache/impala/rewrite/RemoveRedundantStringCast.java: http://gerrit.cloudera.org:8080/#/c/8660/1/fe/src/main/java/org/apache/impala/rewrite/RemoveRedundantStringCast.java@55 PS1, Line 55: oolean isPotentiallyRedundantCast Seems unnecessary to store this instead of just doing it inline in the 'if' http://gerrit.cloudera.org:8080/#/c/8660/1/fe/src/test/java/org/apache/impala/analysis/ExprRewriteRulesTest.java File fe/src/test/java/org/apache/impala/analysis/ExprRewriteRulesTest.java: http://gerrit.cloudera.org:8080/#/c/8660/1/fe/src/test/java/org/apache/impala/analysis/ExprRewriteRulesTest.java@589 PS1, Line 589: RewritesOk("cast(tinyint_col as string) = '100'", rule, "tinyint_col = 100"); In all of your cases here, the cast() is applied on a slotref, and the constant is just a simple value. How about some cases with more complex expressions for both, eg: cast(int_col + 1 as string) = concat('a', 'a') -- To view, visit http://gerrit.cloudera.org:8080/8660 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I91b7c6452d0693115f9b9ed9ba09f3ffe0f36b2b Gerrit-Change-Number: 8660 Gerrit-PatchSet: 1 Gerrit-Owner: Bikramjeet Vig <bikramjeet....@cloudera.com> Gerrit-Reviewer: Alex Behm <alex.b...@cloudera.com> Gerrit-Reviewer: Thomas Tauber-Marshall <tmarsh...@cloudera.com> Gerrit-Reviewer: Tim Armstrong <tarmstr...@cloudera.com> Gerrit-Comment-Date: Tue, 28 Nov 2017 23:10:05 +0000 Gerrit-HasComments: Yes