Java Code Examples for org.apache.calcite.rel.logical.LogicalFilter#copy()
The following examples show how to use
org.apache.calcite.rel.logical.LogicalFilter#copy() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PreProcessRel.java From dremio-oss with Apache License 2.0 | 5 votes |
@Override public RelNode visit(LogicalFilter filter) { final RexNode condition = filter.getCondition().accept(unwrappingExpressionVisitor); filter = filter.copy( filter.getTraitSet(), filter.getInput(), condition); return visitChild(filter, 0, filter.getInput()); }
Example 2
Source File: RelStructuredTypeFlattener.java From calcite with Apache License 2.0 | 5 votes |
public void rewriteRel(LogicalFilter rel) { RelTraitSet traits = rel.getTraitSet(); RewriteRexShuttle rewriteRexShuttle = new RewriteRexShuttle(); RexNode oldCondition = rel.getCondition(); RelNode newInput = getNewForOldRel(rel.getInput()); RexNode newCondition = oldCondition.accept(rewriteRexShuttle); LogicalFilter newRel = rel.copy(traits, newInput, newCondition); setNewForOldRel(rel, newRel); }
Example 3
Source File: RelStructuredTypeFlattener.java From Bats with Apache License 2.0 | 4 votes |
public void rewriteRel(LogicalFilter rel) { RelNode newRel = rel.copy(rel.getTraitSet(), getNewForOldRel(rel.getInput()), rel.getCondition().accept(new RewriteRexShuttle())); setNewForOldRel(rel, newRel); }
Example 4
Source File: PreProcessLogicalRel.java From Bats with Apache License 2.0 | 4 votes |
@Override public RelNode visit(LogicalFilter filter) { final RexNode condition = filter.getCondition().accept(unwrappingExpressionVisitor); filter = filter.copy(filter.getTraitSet(), filter.getInput(), condition); return visitChild(filter, 0, filter.getInput()); }