本文整理汇总了Java中org.apache.calcite.sql.type.OperandTypes.ANY_ANY属性的典型用法代码示例。如果您正苦于以下问题:Java OperandTypes.ANY_ANY属性的具体用法?Java OperandTypes.ANY_ANY怎么用?Java OperandTypes.ANY_ANY使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.calcite.sql.type.OperandTypes
的用法示例。
在下文中一共展示了OperandTypes.ANY_ANY属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: apply
@Override
public RexNode apply(RexBuilderContext context) {
RelOptCluster cluster = context.getCluster();
RelDataTypeFactory typeFactory = cluster.getTypeFactory();
final SqlFunction UDF =
new SqlUserDefinedFunction(
new SqlIdentifier("RESOLVE_SIMPLE", SqlParserPos.ZERO),
ReturnTypes.explicit(typeFactory.createJavaType(Object.class)),
null,
OperandTypes.ANY_ANY,
ImmutableList.of(typeFactory.createTypeWithNullability(typeFactory.createJavaType(IObject.class), false),
typeFactory.createJavaType(int.class)),
ScalarFunctionImpl.create(IObjectMethods.class, "resolveSimpleValue"));
RexBuilder b = context.getBuilder();
RexNode rexNode = b.makeCall(UDF, context.getIObject(), b.makeLiteral(name));
return b.makeCast(dataType, rexNode);
}
示例2: getIObject
public RexNode getIObject() {
if (object == null) {
RelDataTypeFactory typeFactory = getCluster().getTypeFactory();
RexBuilder b = getBuilder();
final SqlFunction GET_IOBJECT =
new SqlUserDefinedFunction(
new SqlIdentifier("GET_IOBJECT", SqlParserPos.ZERO),
ReturnTypes.explicit(typeFactory.createTypeWithNullability(typeFactory.createJavaType(IObject.class), false)),
null,
OperandTypes.ANY_ANY,
ImmutableList.of(typeFactory.createTypeWithNullability(typeFactory.createJavaType(ISnapshot.class), false),
typeFactory.createJavaType(int.class)),
ScalarFunctionImpl.create(ISnapshotMethods.class, "getIObject"));
object = b.makeCall(GET_IOBJECT, getSnapshot(), getIObjectId());
}
return object;
}
示例3: SqlAsOperator
/**
* Creates an AS operator.
*/
public SqlAsOperator() {
this(
"AS",
SqlKind.AS,
20,
true,
ReturnTypes.ARG0,
InferTypes.RETURN_TYPE,
OperandTypes.ANY_ANY);
}
示例4: SqlOverOperator
public SqlOverOperator() {
super(
"OVER",
SqlKind.OVER,
20,
true,
ReturnTypes.ARG0_FORCE_NULLABLE,
null,
OperandTypes.ANY_ANY);
}
示例5: SqlFilterOperator
public SqlFilterOperator() {
super("FILTER", SqlKind.FILTER, 2, true, ReturnTypes.ARG0_FORCE_NULLABLE,
null, OperandTypes.ANY_ANY);
}
示例6: SqlArgumentAssignmentOperator
SqlArgumentAssignmentOperator() {
super("=>", SqlKind.ARGUMENT_ASSIGNMENT, 20, true, ReturnTypes.ARG0,
InferTypes.RETURN_TYPE, OperandTypes.ANY_ANY);
}