[ https://issues.apache.org/jira/browse/CALCITE-3761?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Stamatis Zampetakis updated CALCITE-3761: ----------------------------------------- Fix Version/s: 1.24.0 > How to write a rule with optional intermediate operands? > -------------------------------------------------------- > > Key: CALCITE-3761 > URL: https://issues.apache.org/jira/browse/CALCITE-3761 > Project: Calcite > Issue Type: Wish > Components: core > Reporter: anjali shrishrimal > Priority: Trivial > Fix For: 1.24.0 > > > I want to write a rule to match a plan based on, only root/top RelNode and > leaf RelNode, all Intermediate RelNodes are optional. > What operands should be passed to such rule? > > Suppose Logical Plan is like given below. > {code:java} > LogicalRelNode4 > LogicalRelNode3 (optional) > LogicalRelNode2 (optional) > LogicalRelNode1 > {code} > LogicalRelNode2 and LogicalRelNode3 are optional. Rule should match the > structure irrespective to the presence of these optional Nodes. > Rule should get matched for all the following structures. > {code:java} > 1. LogicalRelNode4 > LogicalRelNode3 > LogicalRelNode2 > LogicalRelNode1 > 2. LogicalRelNode4 > LogicalRelNode2 > LogicalRelNode1 > 3. LogicalRelNode4 > LogicalRelNode3 > LogicalRelNode1 > 4. LogicalRelNode4 > LogicalRelNode1 > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005)