Class RemoveEmptyMergeWriterRuleSet

java.lang.Object
io.trino.sql.planner.iterative.rule.RemoveEmptyMergeWriterRuleSet

public final class RemoveEmptyMergeWriterRuleSet extends Object
If the predicate for a mergeWriter is optimized to false, the target table scan of the mergeWriter will be replaced with an empty values node. This type of plan cannot be executed and is meaningless anyway, so we replace the entire thing with a values node.

Transforms

  - TableFinish
    - Exchange (optional)
      - MergeWriter
        - Exchange
          - Project
            - empty Values
 
into
  - Values (0)
 
  • Method Details

    • rules

      public static Set<Rule<?>> rules()