本文整理了Java中org.apache.calcite.plan.RelOptUtil.equal
方法的一些代码示例,展示了RelOptUtil.equal
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RelOptUtil.equal
方法的具体详情如下:
包路径:org.apache.calcite.plan.RelOptUtil
类名称:RelOptUtil
方法名:equal
[英]Returns whether two types are equal using #areRowTypesEqual(RelDataType,RelDataType,boolean). Both types must not be null.
[中]使用#areRowTypesEqual(RelDataType、RelDataType、boolean)返回两个类型是否相等。两种类型都不能为null。
代码示例来源:origin: apache/drill
/** Returns whether two relational expressions have the same row-type. */
public static boolean equalType(String desc0, MutableRel rel0, String desc1,
MutableRel rel1, Litmus litmus) {
return RelOptUtil.equal(desc0, rel0.getRowType(),
desc1, rel1.getRowType(), litmus);
}
代码示例来源:origin: Qihoo360/Quicksql
/** Returns whether two relational expressions have the same row-type. */
public static boolean equalType(String desc0, MutableRel rel0, String desc1,
MutableRel rel1, Litmus litmus) {
return RelOptUtil.equal(desc0, rel0.rowType, desc1, rel1.rowType, litmus);
}
代码示例来源:origin: org.apache.calcite/calcite-core
/** Returns whether two relational expressions have the same row-type. */
public static boolean equalType(String desc0, MutableRel rel0, String desc1,
MutableRel rel1, Litmus litmus) {
return RelOptUtil.equal(desc0, rel0.rowType, desc1, rel1.rowType, litmus);
}
代码示例来源:origin: Qihoo360/Quicksql
/** Returns whether two relational expressions have the same row-type. */
public static boolean equalType(String desc0, RelNode rel0, String desc1,
RelNode rel1, Litmus litmus) {
// TODO: change 'equal' to 'eq', which is stronger.
return equal(desc0, rel0.getRowType(), desc1, rel1.getRowType(), litmus);
}
代码示例来源:origin: org.apache.calcite/calcite-core
/** Returns whether two relational expressions have the same row-type. */
public static boolean equalType(String desc0, RelNode rel0, String desc1,
RelNode rel1, Litmus litmus) {
// TODO: change 'equal' to 'eq', which is stronger.
return equal(desc0, rel0.getRowType(), desc1, rel1.getRowType(), litmus);
}
代码示例来源:origin: tzolov/calcite-sql-rewriter
);
RelOptUtil.equal(
"RowType of original", p.getRowType(),
"RowType of replaced", updated.getRowType(),
代码示例来源: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;
}
代码示例来源: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: Qihoo360/Quicksql
public RelSubset register(
RelNode rel,
RelNode equivRel) {
assert !isRegistered(rel) : "pre: isRegistered(rel)";
final RelSet set;
if (equivRel == null) {
set = null;
} else {
assert RelOptUtil.equal(
"rel rowtype",
rel.getRowType(),
"equivRel rowtype",
equivRel.getRowType(),
Litmus.THROW);
set = getSet(equivRel);
}
final RelSubset subset = registerImpl(rel, set);
// Checking if tree is valid considerably slows down planning
// Only doing it if logger level is debug or finer
if (LOGGER.isDebugEnabled()) {
assert isValid(Litmus.THROW);
}
return subset;
}
代码示例来源:origin: org.apache.calcite/calcite-core
public RelSubset register(
RelNode rel,
RelNode equivRel) {
assert !isRegistered(rel) : "pre: isRegistered(rel)";
final RelSet set;
if (equivRel == null) {
set = null;
} else {
assert RelOptUtil.equal(
"rel rowtype",
rel.getRowType(),
"equivRel rowtype",
equivRel.getRowType(),
Litmus.THROW);
set = getSet(equivRel);
}
final RelSubset subset = registerImpl(rel, set);
// Checking if tree is valid considerably slows down planning
// Only doing it if logger level is debug or finer
if (LOGGER.isDebugEnabled()) {
assert isValid(Litmus.THROW);
}
return subset;
}
代码示例来源:origin: Qihoo360/Quicksql
RelOptUtil.equal("rowtype of new rel", rel.getRowType(),
"rowtype of set", getRowType(), Litmus.THROW);
代码示例来源:origin: org.apache.calcite/calcite-core
RelOptUtil.equal("rowtype of new rel", rel.getRowType(),
"rowtype of set", getRowType(), Litmus.THROW);
代码示例来源:origin: org.apache.flink/flink-table_2.10
validator.getTypeFactory().createStructType(convertedFields);
if (!RelOptUtil.equal("validated row type", validatedRowType,
"converted row type", convertedRowType, Litmus.IGNORE)) {
throw new AssertionError("Conversion to relational algebra failed to "
代码示例来源:origin: org.apache.kylin/atopcalcite
validator.getTypeFactory().createStructType(convertedFields);
if (!RelOptUtil.equal("validated row type", validatedRowType,
"converted row type", convertedRowType, Litmus.IGNORE)) {
throw new AssertionError("Conversion to relational algebra failed to "
代码示例来源:origin: Qihoo360/Quicksql
validator.getTypeFactory().createStructType(convertedFields);
if (!RelOptUtil.equal("validated row type", validatedRowType,
"converted row type", convertedRowType, Litmus.IGNORE)) {
throw new AssertionError("Conversion to relational algebra failed to "
代码示例来源:origin: org.apache.calcite/calcite-core
validator.getTypeFactory().createStructType(convertedFields);
if (!RelOptUtil.equal("validated row type", validatedRowType,
"converted row type", convertedRowType, Litmus.IGNORE)) {
throw new AssertionError("Conversion to relational algebra failed to "
代码示例来源:origin: Qihoo360/Quicksql
public boolean isValid(Litmus litmus, Context context) {
if (!RelOptUtil.equal(
"program's input type",
program.getInputRowType(),
"child's output type",
getInput().getRowType(), litmus)) {
return litmus.fail(null);
}
if (!program.isValid(litmus, context)) {
return litmus.fail(null);
}
if (!program.isNormalized(litmus, getCluster().getRexBuilder())) {
return litmus.fail(null);
}
return litmus.succeed();
}
代码示例来源:origin: org.apache.calcite/calcite-core
public boolean isValid(Litmus litmus, Context context) {
if (!RelOptUtil.equal(
"program's input type",
program.getInputRowType(),
"child's output type",
getInput().getRowType(), litmus)) {
return litmus.fail(null);
}
if (!program.isValid(litmus, context)) {
return litmus.fail(null);
}
if (!program.isNormalized(litmus, getCluster().getRexBuilder())) {
return litmus.fail(null);
}
return litmus.succeed();
}
代码示例来源:origin: Qihoo360/Quicksql
Assert.assertTrue(
msg2,
RelOptUtil.equal(
"origRelType", origRelType,
"mutableRelType", mutableRelType,
代码示例来源:origin: org.apache.calcite/calcite-core
Assert.assertTrue(
msg2,
RelOptUtil.equal(
"origRelType", origRelType,
"mutableRelType", mutableRelType,
内容来源于网络,如有侵权,请联系作者删除!