Csaba Ringhofer created IMPALA-14576:
----------------------------------------

             Summary: Add st_EnvIntersects  before other st_ relations
                 Key: IMPALA-14576
                 URL: https://issues.apache.org/jira/browse/IMPALA-14576
             Project: IMPALA
          Issue Type: Sub-task
          Components: Frontend
            Reporter: Csaba Ringhofer


Example rewrite:
{code}
st_intersects(<geom1>, <geom2>) ->
st_envintersects(<geom1>, <geom2>) AND st_intersects(<geom1>, <geom2>) 
{code}

This can't be implemented as a simple expression rewrite rule because the 
original st_intersects() is unchanged and the same rule could be applied again. 
A new "inferred predicate" logic is needed that applies a rule only once to the 
expression tree.

This may be a temporary but significant improvement - st_envintersects() is 
much easier to port to c++ than the "full" relation functions like 
st_intersects.
st_envIntersects is rewritten here: 
https://gerrit.cloudera.org/#/c/23700/6/be/src/exprs/geo/geospatial-functions-ir.cc

other st_ relations are rewritten here using boost::geometry:
https://gerrit.cloudera.org/#/c/20602/6/be/src/exprs/geo/relation-wrapper.h

The first change is much simpler and safer and could be merged in the near 
future.

Note that IMPALA-14571 ensures that native functions are evaluated before Java 
ones in predicates, so st_envIntersects would be evaluated before the "full" 
relation (if c++ rewrite for st_envIntersects gets merged while other relations 
stay in Java).






--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to