当前位置: 首页>>代码示例>>Java>>正文


Java OperandTypes.ANY_ANY属性代码示例

本文整理汇总了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);
}
 
开发者ID:vlsi,项目名称:mat-calcite-plugin,代码行数:17,代码来源:ClassRowTypeCache.java

示例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;
}
 
开发者ID:vlsi,项目名称:mat-calcite-plugin,代码行数:17,代码来源:RexBuilderContext.java

示例3: SqlAsOperator

/**
 * Creates an AS operator.
 */
public SqlAsOperator() {
  this(
      "AS",
      SqlKind.AS,
      20,
      true,
      ReturnTypes.ARG0,
      InferTypes.RETURN_TYPE,
      OperandTypes.ANY_ANY);
}
 
开发者ID:apache,项目名称:calcite,代码行数:13,代码来源:SqlAsOperator.java

示例4: SqlOverOperator

public SqlOverOperator() {
  super(
      "OVER",
      SqlKind.OVER,
      20,
      true,
      ReturnTypes.ARG0_FORCE_NULLABLE,
      null,
      OperandTypes.ANY_ANY);
}
 
开发者ID:apache,项目名称:calcite,代码行数:10,代码来源:SqlOverOperator.java

示例5: SqlFilterOperator

public SqlFilterOperator() {
  super("FILTER", SqlKind.FILTER, 2, true, ReturnTypes.ARG0_FORCE_NULLABLE,
      null, OperandTypes.ANY_ANY);
}
 
开发者ID:apache,项目名称:calcite,代码行数:4,代码来源:SqlFilterOperator.java

示例6: SqlArgumentAssignmentOperator

SqlArgumentAssignmentOperator() {
  super("=>", SqlKind.ARGUMENT_ASSIGNMENT, 20, true, ReturnTypes.ARG0,
      InferTypes.RETURN_TYPE, OperandTypes.ANY_ANY);
}
 
开发者ID:apache,项目名称:calcite,代码行数:4,代码来源:SqlArgumentAssignmentOperator.java


注:本文中的org.apache.calcite.sql.type.OperandTypes.ANY_ANY属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。