本文整理了Java中org.apache.calcite.rel.core.Filter.getRowType()
方法的一些代码示例,展示了Filter.getRowType()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Filter.getRowType()
方法的具体详情如下:
包路径:org.apache.calcite.rel.core.Filter
类名称:Filter
方法名:getRowType
暂无
代码示例来源:origin: apache/drill
try {
newOperand = transformIntoInClauseCondition(rexBuilder,
filterOp.getRowType(), operand, minNumORClauses);
if (newOperand == null) {
newOperand = operand;
try {
node = transformIntoInClauseCondition(rexBuilder,
filterOp.getRowType(), call, minNumORClauses);
if (node == null) {
return call;
代码示例来源:origin: apache/hive
relBuilder.push(result).convert(filterRel.getRowType(), false).build());
代码示例来源:origin: apache/drill
public void onMatch(RelOptRuleCall call) {
final Filter filter = call.rel(0);
//final RelBuilder builder = call.builder();
//TODO: replace HiveSubQRemoveRelBuilder with calcite's once calcite 1.11.0 is released
final HiveSubQRemoveRelBuilder builder = new HiveSubQRemoveRelBuilder(null, call.rel(0).getCluster(), null);
final RexSubQuery e =
RexUtil.SubQueryFinder.find(filter.getCondition());
assert e != null;
final RelOptUtil.Logic logic =
LogicVisitor.find(RelOptUtil.Logic.TRUE,
ImmutableList.of(filter.getCondition()), e);
builder.push(filter.getInput());
final int fieldCount = builder.peek().getRowType().getFieldCount();
assert(filter instanceof HiveFilter);
Set<RelNode> corrScalarQueries = filter.getCluster().getPlanner().getContext().unwrap(Set.class);
boolean isCorrScalarQuery = corrScalarQueries.contains(e.rel);
final RexNode target = apply(e, HiveFilter.getVariablesSet(e), logic,
builder, 1, fieldCount, isCorrScalarQuery);
final RexShuttle shuttle = new ReplaceSubQueryShuttle(e, target);
builder.filter(shuttle.apply(filter.getCondition()));
builder.project(fields(builder, filter.getRowType().getFieldCount()));
call.transformTo(builder.build());
}
};
代码示例来源:origin: apache/hive
final RexShuttle shuttle = new ReplaceSubQueryShuttle(e, target);
builder.filter(shuttle.apply(filter.getCondition()));
builder.project(fields(builder, filter.getRowType().getFieldCount()));
call.transformTo(builder.build());
} else if(relNode instanceof Project) {
代码示例来源:origin: Qihoo360/Quicksql
public FilterNode(Compiler compiler, Filter rel) {
super(compiler, rel);
this.condition =
compiler.compile(ImmutableList.of(rel.getCondition()),
rel.getRowType());
this.context = compiler.createContext();
}
代码示例来源:origin: org.apache.calcite/calcite-core
public FilterNode(Compiler compiler, Filter rel) {
super(compiler, rel);
this.condition =
compiler.compile(ImmutableList.of(rel.getCondition()),
rel.getRowType());
this.context = compiler.createContext();
}
代码示例来源:origin: dremio/dremio-oss
final RelDataType rowType = filterRel.getRowType();
final List<FilterProperties> filters = FluentIterable
.from(conditions)
代码示例来源:origin: dremio/dremio-oss
/**
* Creates a RexProgram corresponding to a LogicalFilter
*
* @param filterRel
* the LogicalFilter
* @return created RexProgram
*/
private RexProgram createProgram(Filter filterRel) {
RexProgramBuilder programBuilder = new RexProgramBuilder(filterRel.getRowType(),
filterRel.getCluster().getRexBuilder());
programBuilder.addIdentity();
programBuilder.addCondition(filterRel.getCondition());
return programBuilder.getProgram();
}
代码示例来源:origin: Qihoo360/Quicksql
/**
* Creates a RexProgram corresponding to a LogicalFilter
*
* @param filterRel the LogicalFilter
* @return created RexProgram
*/
private RexProgram createProgram(Filter filterRel) {
RexProgramBuilder programBuilder =
new RexProgramBuilder(
filterRel.getRowType(),
filterRel.getCluster().getRexBuilder());
programBuilder.addIdentity();
programBuilder.addCondition(filterRel.getCondition());
return programBuilder.getProgram();
}
}
代码示例来源:origin: org.apache.drill.exec/drill-java-exec
/**
* Creates a RexProgram corresponding to a LogicalFilter
*
* @param filterRel the LogicalFilter
* @return created RexProgram
*/
private RexProgram createProgram(Filter filterRel) {
RexProgramBuilder programBuilder =
new RexProgramBuilder(
filterRel.getRowType(),
filterRel.getCluster().getRexBuilder());
programBuilder.addIdentity();
programBuilder.addCondition(filterRel.getCondition());
return programBuilder.getProgram();
}
}
代码示例来源:origin: org.apache.calcite/calcite-core
/**
* Creates a RexProgram corresponding to a LogicalFilter
*
* @param filterRel the LogicalFilter
* @return created RexProgram
*/
private RexProgram createProgram(Filter filterRel) {
RexProgramBuilder programBuilder =
new RexProgramBuilder(
filterRel.getRowType(),
filterRel.getCluster().getRexBuilder());
programBuilder.addIdentity();
programBuilder.addCondition(filterRel.getCondition());
return programBuilder.getProgram();
}
}
代码示例来源:origin: Qihoo360/Quicksql
final RexInputRef ref = RexInputRef.of(idx, filter.getRowType().getFieldList());
final Set<RexNode> originalExprs = mq.getExpressionLineage(filter, ref);
if (originalExprs == null) {
代码示例来源:origin: org.apache.calcite/calcite-core
final RexInputRef ref = RexInputRef.of(idx, filter.getRowType().getFieldList());
final Set<RexNode> originalExprs = mq.getExpressionLineage(filter, ref);
if (originalExprs == null) {
代码示例来源:origin: Qihoo360/Quicksql
public void onMatch(RelOptRuleCall call) {
final Filter filter = call.rel(0);
final RelBuilder builder = call.builder();
builder.push(filter.getInput());
int count = 0;
RexNode c = filter.getCondition();
while (true) {
final RexSubQuery e = RexUtil.SubQueryFinder.find(c);
if (e == null) {
assert count > 0;
break;
}
++count;
final RelOptUtil.Logic logic =
LogicVisitor.find(RelOptUtil.Logic.TRUE, ImmutableList.of(c), e);
final Set<CorrelationId> variablesSet =
RelOptUtil.getVariablesUsed(e.rel);
final RexNode target = apply(e, variablesSet, logic,
builder, 1, builder.peek().getRowType().getFieldCount());
final RexShuttle shuttle = new ReplaceSubQueryShuttle(e, target);
c = c.accept(shuttle);
}
builder.filter(c);
builder.project(fields(builder, filter.getRowType().getFieldCount()));
call.transformTo(builder.build());
}
}
代码示例来源:origin: org.apache.calcite/calcite-core
public void onMatch(RelOptRuleCall call) {
final Filter filter = call.rel(0);
final RelBuilder builder = call.builder();
builder.push(filter.getInput());
int count = 0;
RexNode c = filter.getCondition();
while (true) {
final RexSubQuery e = RexUtil.SubQueryFinder.find(c);
if (e == null) {
assert count > 0;
break;
}
++count;
final RelOptUtil.Logic logic =
LogicVisitor.find(RelOptUtil.Logic.TRUE, ImmutableList.of(c), e);
final Set<CorrelationId> variablesSet =
RelOptUtil.getVariablesUsed(e.rel);
final RexNode target = apply(e, variablesSet, logic,
builder, 1, builder.peek().getRowType().getFieldCount());
final RexShuttle shuttle = new ReplaceSubQueryShuttle(e, target);
c = c.accept(shuttle);
}
builder.filter(c);
builder.project(fields(builder, filter.getRowType().getFieldCount()));
call.transformTo(builder.build());
}
}
代码示例来源:origin: Qihoo360/Quicksql
ImmutableBitSet fieldsUsed,
Set<RelDataTypeField> extraFields) {
final RelDataType rowType = filter.getRowType();
final int fieldCount = rowType.getFieldCount();
final RexNode conditionExpr = filter.getCondition();
代码示例来源:origin: org.apache.calcite/calcite-core
ImmutableBitSet fieldsUsed,
Set<RelDataTypeField> extraFields) {
final RelDataType rowType = filter.getRowType();
final int fieldCount = rowType.getFieldCount();
final RexNode conditionExpr = filter.getCondition();
内容来源于网络,如有侵权,请联系作者删除!