OmniSciDB  72180abbfe
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
com.mapd.calcite.parser.ProjectProjectRemoveRule Class Reference
+ Inheritance diagram for com.mapd.calcite.parser.ProjectProjectRemoveRule:
+ Collaboration diagram for com.mapd.calcite.parser.ProjectProjectRemoveRule:

Public Member Functions

 ProjectProjectRemoveRule (RelBuilderFactory relBuilderFactory)
void onMatch (RelOptRuleCall call)

Static Public Attributes

static final

Static Package Functions

static RelNode unwrap (RelNode node)

Private Attributes

ProjectRemoveRule innerRule

Detailed Description

removes identical projection nodes, if they are not the outer most projection or if the child is a projection

Definition at line 32 of file

Constructor & Destructor Documentation

com.mapd.calcite.parser.ProjectProjectRemoveRule.ProjectProjectRemoveRule ( RelBuilderFactory  relBuilderFactory)

Creates a ProjectRemoveRule.

relBuilderFactoryBuilder for relational expressions

Definition at line 51 of file

References com.mapd.calcite.parser.ProjectProjectRemoveRule.innerRule.

51  {
52  super(operandJ(Project.class, null, ProjectRemoveRule::isTrivial, any()),
53  relBuilderFactory,
54  null);
55  innerRule = new ProjectRemoveRule(relBuilderFactory);
56  }

Member Function Documentation

void com.mapd.calcite.parser.ProjectProjectRemoveRule.onMatch ( RelOptRuleCall  call)

Definition at line 59 of file

References com.mapd.calcite.parser.ProjectProjectRemoveRule.unwrap().

59  {
60  boolean hasParents = null != call.getParents() && !call.getParents().isEmpty();
61  Project project = (Project) call.rel(0);
62  boolean inputIsProject = unwrap(project.getInput()) instanceof Project;
63  if (hasParents || inputIsProject) {
64  innerRule.onMatch(call);
65  }
66  }

+ Here is the call graph for this function:

static RelNode com.mapd.calcite.parser.ProjectProjectRemoveRule.unwrap ( RelNode  node)

Definition at line 33 of file

Referenced by com.mapd.calcite.parser.ProjectProjectRemoveRule.onMatch().

33  {
34  if (node instanceof HepRelVertex) {
35  return unwrap(((HepRelVertex) node).getCurrentRel());
36  }
38  return node;
39  }

+ Here is the caller graph for this function:

Member Data Documentation

ProjectRemoveRule com.mapd.calcite.parser.ProjectProjectRemoveRule.innerRule
final ProjectProjectRemoveRule com.mapd.calcite.parser.ProjectProjectRemoveRule.INSTANCE
Initial value:
new ProjectProjectRemoveRule(RelFactories.LOGICAL_BUILDER)

Definition at line 41 of file

The documentation for this class was generated from the following file: