[ 
https://issues.apache.org/jira/browse/ATLAS-1369?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jeffrey Hagelberg updated ATLAS-1369:
-------------------------------------
    Description: 
The way the queries are generated now, in many cases the indices are not used 
when executing queries.  The main problem is that gremlin cannot currently use 
"has" expressions within an "and" or an "or".  This JIRA introduces a 
GremlinQueryOptimizer that attempts to extract "has" expressions out of "and" 
expressions and turn "or" expressions into unions.

The code being submitted has only been tested with TP 3 at this point.  There 
are some issues that need to be fixed before this can be used with TP 2:
   - FunctionGenerator - generates functions that take GraphTraversal as an 
argument.  That should be changed to GreminPipeline.  The return type should 
probably come from a new method in GremlinExpressionFactory
   - loop support - for TP2, we will need to add logic to make sure that the 
loop call is not separated from the alias it references
  - alias handling - the alias safe/restore logic in 
ExpandOrsOptimization.getBaseResultExpression() may be need to adjusted for TP2
  - possibly other issues, TBD

  was:The way the queries are generated now, in many cases the indices are not 
used when executing queries.  The main problem is that gremlin cannot currently 
use "has" expressions within an "and" or an "or".  This JIRA introduces a 
GremlinQueryOptimizer that attempts to extract "has" expressions out of "and" 
expressions and turn "or" expressions into unions.


> Optimize Gremlin created by DSL Translator
> ------------------------------------------
>
>                 Key: ATLAS-1369
>                 URL: https://issues.apache.org/jira/browse/ATLAS-1369
>             Project: Atlas
>          Issue Type: Improvement
>            Reporter: Jeffrey Hagelberg
>            Assignee: Jeffrey Hagelberg
>
> The way the queries are generated now, in many cases the indices are not used 
> when executing queries.  The main problem is that gremlin cannot currently 
> use "has" expressions within an "and" or an "or".  This JIRA introduces a 
> GremlinQueryOptimizer that attempts to extract "has" expressions out of "and" 
> expressions and turn "or" expressions into unions.
> The code being submitted has only been tested with TP 3 at this point.  There 
> are some issues that need to be fixed before this can be used with TP 2:
>    - FunctionGenerator - generates functions that take GraphTraversal as an 
> argument.  That should be changed to GreminPipeline.  The return type should 
> probably come from a new method in GremlinExpressionFactory
>    - loop support - for TP2, we will need to add logic to make sure that the 
> loop call is not separated from the alias it references
>   - alias handling - the alias safe/restore logic in 
> ExpandOrsOptimization.getBaseResultExpression() may be need to adjusted for 
> TP2
>   - possibly other issues, TBD



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to