Alex Behm has posted comments on this change. ( http://gerrit.cloudera.org:8080/7793 )
Change subject: IMPALA-4252: Min-max runtime filters for Kudu ...................................................................... Patch Set 13: (7 comments) Looks pretty good to me http://gerrit.cloudera.org:8080/#/c/7793/13/be/src/exec/kudu-scanner.cc File be/src/exec/kudu-scanner.cc: http://gerrit.cloudera.org:8080/#/c/7793/13/be/src/exec/kudu-scanner.cc@200 PS13, Line 200: if (!filter->GetCastIntMinMax(col_type, &int_min, &int_max)) { Unfortunate that that every Kudu client has to do this. We should consider filing a JIRA against Kudu to address perform this logic on their side. http://gerrit.cloudera.org:8080/#/c/7793/13/be/src/util/min-max-filter.cc File be/src/util/min-max-filter.cc: http://gerrit.cloudera.org:8080/#/c/7793/13/be/src/util/min-max-filter.cc@139 PS13, Line 139: return std::numeric_limits<int64_t>::max(); using std::numeric_limits; at the top if this file http://gerrit.cloudera.org:8080/#/c/7793/13/be/src/util/min-max-filter.cc@165 PS13, Line 165: #define NUMERIC_MIN_MAX_FILTER_CAST(NAME) \ Brief comment especially about the return value would be good. http://gerrit.cloudera.org:8080/#/c/7793/13/fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java File fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java: http://gerrit.cloudera.org:8080/#/c/7793/13/fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java@604 PS13, Line 604: // must be a SlotRef pointing to a column. Wc can allow implicit integer casts typo: We can allow implicit integer casts http://gerrit.cloudera.org:8080/#/c/7793/13/fe/src/main/java/org/apache/impala/planner/RuntimeFilterGenerator.java@605 PS13, Line 605: // by casting the min/max value before sending them to Kudu. min/max values http://gerrit.cloudera.org:8080/#/c/7793/13/testdata/workloads/functional-query/queries/QueryTest/min_max_filters.test File testdata/workloads/functional-query/queries/QueryTest/min_max_filters.test: http://gerrit.cloudera.org:8080/#/c/7793/13/testdata/workloads/functional-query/queries/QueryTest/min_max_filters.test@98 PS13, Line 98: where a.tinyint_col = b.int_col Let's make the min/max filter selective, e.g. by adding where b.int_col in (0,1) or something like that http://gerrit.cloudera.org:8080/#/c/7793/13/testdata/workloads/functional-query/queries/QueryTest/min_max_filters.test@103 PS13, Line 103: # The min/max values in the filter are outside the range representable for the target col. Let's also add a non-selective case where the min/max values fall outside the range of the target column, something like: select STRAIGHT_JOIN count(*) from alltypes a join [BROADCAST] (values(min_int() x), (max_int())) v where a.tinyint_col = v.x -- To view, visit http://gerrit.cloudera.org:8080/7793 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I02bad890f5b5f78388a3041bf38f89369b5e2f1c Gerrit-Change-Number: 7793 Gerrit-PatchSet: 13 Gerrit-Owner: Thomas Tauber-Marshall <[email protected]> Gerrit-Reviewer: Alex Behm <[email protected]> Gerrit-Reviewer: Anonymous Coward #345 Gerrit-Reviewer: Dan Hecht <[email protected]> Gerrit-Reviewer: Lars Volker <[email protected]> Gerrit-Reviewer: Matthew Jacobs <[email protected]> Gerrit-Reviewer: Michael Ho <[email protected]> Gerrit-Reviewer: Mostafa Mokhtar <[email protected]> Gerrit-Reviewer: Thomas Tauber-Marshall <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-Comment-Date: Thu, 09 Nov 2017 00:02:39 +0000 Gerrit-HasComments: Yes
