GinqAstOptimizer (Groovy 5.1.0)

Package: org.apache.groovy.ginq.dsl

## [Groovy] Class GinqAstOptimizer

- org.apache.groovy.ginq.dsl.GinqAstOptimizer

-     @CompileStatic
      class GinqAstOptimizer
      extends GinqAstBaseVisitor

  Optimize the execution plan of GINQ through transforming AST.

  Note:The optimizer only optimizes the AST for inner/left joins for now, e.g.

          from n1 in nums1
          innerjoin n2 in nums2 on n1 == n2
          where n1 > 1 && n2 <= 3
          select n1, n2

  will be optimized to

          from n1 in (
            from alias86329782 in nums1
            where alias86329782 > 1
            select alias86329782
          )
          innerjoin n2 in (
            from alias23802906 in nums2
            where alias23802906 <= 3
            select alias23802906
          ) on n1 == n2
          select n1, n2

  Since:
    4.0.0

- - ### Constructor Summary

    Constructors
    Constructor and description
    `GinqAstOptimizer()`

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `Void` | `visitGinqExpression(GinqExpression ginqExpression)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class GinqAstBaseVisitor` | `visit, visitFromExpression, visitGinqExpression, visitGroupExpression, visitHavingExpression, visitJoinExpression, visitLimitExpression, visitOnExpression, visitOrderExpression, visitSelectExpression, visitShutdownExpression, visitWhereExpression`
    `class CodeVisitorSupport` | `afterSwitchCaseStatementsVisited, afterSwitchConditionExpressionVisited, visitArgumentlistExpression, visitArrayExpression, visitAssertStatement, visitAttributeExpression, visitBinaryExpression, visitBitwiseNegationExpression, visitBlockStatement, visitBooleanExpression, visitBreakStatement, visitBytecodeExpression, visitCaseStatement, visitCastExpression, visitCatchStatement, visitClassExpression, visitClosureExpression, visitClosureListExpression, visitConstantExpression, visitConstructorCallExpression, visitContinueStatement, visitDeclarationExpression, visitDoWhileLoop, visitEmptyStatement, visitExpressionStatement, visitFieldExpression, visitForLoop, visitGStringExpression, visitIfElse, visitLambdaExpression, visitListExpression, visitMapEntryExpression, visitMapExpression, visitMethodCallExpression, visitMethodPointerExpression, visitMethodReferenceExpression, visitNotExpression, visitPostfixExpression, visitPrefixExpression, visitPropertyExpression, visitRangeExpression, visitReturnStatement, visitShortTernaryExpression, visitSpreadExpression, visitSpreadMapExpression, visitStaticMethodCallExpression, visitSwitch, visitSynchronizedStatement, visitTernaryExpression, visitThrowStatement, visitTryCatchFinally, visitTupleExpression, visitUnaryMinusExpression, visitUnaryPlusExpression, visitVariableExpression, visitWhileLoop`

- - ### Constructor Detail

    - #### GinqAstOptimizer()

  - ### Method Detail

    - #### @Override
      Void visitGinqExpression(GinqExpression ginqExpression)