Zoltan Borok-Nagy has posted comments on this change. ( http://gerrit.cloudera.org:8080/23719 )
Change subject: IMPALA-14576, IMPALA-14577: add rewrite rules for geospatial relations ...................................................................... Patch Set 8: (6 comments) Left a few nits, but looks good to me! http://gerrit.cloudera.org:8080/#/c/23719/8//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/23719/8//COMMIT_MSG@48 PS8, Line 48: Are there any measurements about the perf gain? AddEnvIntersectsRule depends on the actual data, but the other ones look like clear wins. http://gerrit.cloudera.org:8080/#/c/23719/8/fe/src/main/java/org/apache/impala/rewrite/AddEnvIntersectsRule.java File fe/src/main/java/org/apache/impala/rewrite/AddEnvIntersectsRule.java: http://gerrit.cloudera.org:8080/#/c/23719/8/fe/src/main/java/org/apache/impala/rewrite/AddEnvIntersectsRule.java@35 PS8, Line 35: s nit: should be singular, or remove 'a' before geospatial http://gerrit.cloudera.org:8080/#/c/23719/8/fe/src/main/java/org/apache/impala/rewrite/AddEnvIntersectsRule.java@70 PS8, Line 70: nit: redundant space http://gerrit.cloudera.org:8080/#/c/23719/8/fe/src/main/java/org/apache/impala/rewrite/AddEnvIntersectsRule.java@75 PS8, Line 75: List<Expr> predicates = Arrays.asList(newPred, expr.clone()); : return CompoundPredicate.createConjunctivePredicate(predicates); Could be just: return new CompoundPredicate(AND, newPred, expr.clone()); http://gerrit.cloudera.org:8080/#/c/23719/8/fe/src/main/java/org/apache/impala/rewrite/PointEnvIntersectsRule.java File fe/src/main/java/org/apache/impala/rewrite/PointEnvIntersectsRule.java: http://gerrit.cloudera.org:8080/#/c/23719/8/fe/src/main/java/org/apache/impala/rewrite/PointEnvIntersectsRule.java@39 PS8, Line 39: st_envintersects(CONST_GEOM, st_point(x, y)) Would it make sense to have a rule for st_envintersects(CONST_POINT, GEOM)? Or maybe generalize this rule to st_envintersects(CONST_GEOM, GEOM)? And if [CONST_]GEOM=point, just use its x/y. http://gerrit.cloudera.org:8080/#/c/23719/8/testdata/workloads/functional-query/queries/QueryTest/geospatial-esri-planner.test File testdata/workloads/functional-query/queries/QueryTest/geospatial-esri-planner.test: http://gerrit.cloudera.org:8080/#/c/23719/8/testdata/workloads/functional-query/queries/QueryTest/geospatial-esri-planner.test@35 PS8, Line 35: Check that PointEnvIntersectsRule is applied nit: This also checks that NormalizeGeospatialRelationsRule was applied before it. -- To view, visit http://gerrit.cloudera.org:8080/23719 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Id65f646db6f1c89a74253e9ff755c39c400328be Gerrit-Change-Number: 23719 Gerrit-PatchSet: 8 Gerrit-Owner: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Xuebin Su <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]> Gerrit-Comment-Date: Tue, 06 Jan 2026 13:29:16 +0000 Gerrit-HasComments: Yes
