Alex Behm has posted comments on this change. Change subject: IMPALA-5494: Fixes the selectivity of NOT IN predicates ......................................................................
Patch Set 6: (6 comments) Thanks for adding the new test! http://gerrit.cloudera.org:8080/#/c/7168/6/fe/src/test/java/org/apache/impala/analysis/ExprSelectivityTest.java File fe/src/test/java/org/apache/impala/analysis/ExprSelectivityTest.java: Line 31: public void verifySelectivityStmt(String stmtStr, double expectedSel) we indent 2 Line 33: SelectStmt stmt = (SelectStmt) ParsesOk(stmtStr); simplify with AnalyzesOk() Line 38: assertEquals(calculatedSel,expectedSel); space after comma Line 43: String stmtStr = "select * from functional.alltypes where id " + simplify this to "select <predicate> from functional.alltypes" Line 52: private double getPredSel(int numPredChild) { Very specific to IN predicate. How about we hardcode the expected values for now? It's not clear to me that it makes sense to re-implement the same logic again for testing purposes. Line 69: verifySel("in (1,3,5,7)", getPredSel(4)); Seems cleaner to provide the full expr as input and not assume "id". That way this framework should work for arbitrary exprs. -- To view, visit http://gerrit.cloudera.org:8080/7168 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: comment Gerrit-Change-Id: I69e6217257b5618cb63e13b32ba3347fa0483b63 Gerrit-PatchSet: 6 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Vincent Tran <[email protected]> Gerrit-Reviewer: Alex Behm <[email protected]> Gerrit-Reviewer: Bharath Vissapragada <[email protected]> Gerrit-Reviewer: Vincent Tran <[email protected]> Gerrit-HasComments: Yes
