本文整理了Java中org.apache.calcite.rel.RelNode.isValid
方法的一些代码示例,展示了RelNode.isValid
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RelNode.isValid
方法的具体详情如下:
包路径:org.apache.calcite.rel.RelNode
类名称:RelNode
方法名:isValid
[英]Returns whether this relational expression is valid.
If assertions are enabled, this method is typically called with litmus
= THROW
, as follows:
assert rel.isValid(Litmus.THROW)
This signals that the method can throw an AssertionError if it is not valid.
[中]返回此关系表达式是否有效。
如果启用了断言,则通常使用litmus
=THROW
调用此方法,如下所示:
assert rel.isValid(Litmus.THROW)
这表明如果断言错误无效,该方法可以抛出断言错误。
代码示例来源:origin: Qihoo360/Quicksql
public void visit(RelNode node, int ordinal, RelNode parent) {
try {
stack.push(node);
if (!node.isValid(Litmus.THROW, this)) {
++invalidCount;
}
super.visit(node, ordinal, parent);
} finally {
stack.pop();
}
}
}
代码示例来源:origin: org.apache.calcite/calcite-core
public void visit(RelNode node, int ordinal, RelNode parent) {
try {
stack.push(node);
if (!node.isValid(Litmus.THROW, this)) {
++invalidCount;
}
super.visit(node, ordinal, parent);
} finally {
stack.pop();
}
}
}
代码示例来源:origin: Qihoo360/Quicksql
public RelNode onRegister(RelOptPlanner planner) {
List<RelNode> oldInputs = getInputs();
List<RelNode> inputs = new ArrayList<>(oldInputs.size());
for (final RelNode input : oldInputs) {
RelNode e = planner.ensureRegistered(input, null);
if (e != input) {
// TODO: change 'equal' to 'eq', which is stronger.
assert RelOptUtil.equal(
"rowtype of rel before registration",
input.getRowType(),
"rowtype of rel after registration",
e.getRowType(),
Litmus.THROW);
}
inputs.add(e);
}
RelNode r = this;
if (!Util.equalShallow(oldInputs, inputs)) {
r = copy(getTraitSet(), inputs);
}
r.recomputeDigest();
assert r.isValid(Litmus.THROW, null);
return r;
}
代码示例来源:origin: org.apache.calcite/calcite-core
public RelNode onRegister(RelOptPlanner planner) {
List<RelNode> oldInputs = getInputs();
List<RelNode> inputs = new ArrayList<>(oldInputs.size());
for (final RelNode input : oldInputs) {
RelNode e = planner.ensureRegistered(input, null);
if (e != input) {
// TODO: change 'equal' to 'eq', which is stronger.
assert RelOptUtil.equal(
"rowtype of rel before registration",
input.getRowType(),
"rowtype of rel after registration",
e.getRowType(),
Litmus.THROW);
}
inputs.add(e);
}
RelNode r = this;
if (!Util.equalShallow(oldInputs, inputs)) {
r = copy(getTraitSet(), inputs);
}
r.recomputeDigest();
assert r.isValid(Litmus.THROW, null);
return r;
}
内容来源于网络,如有侵权,请联系作者删除!