• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java RexDynamicParam类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.apache.calcite.rex.RexDynamicParam的典型用法代码示例。如果您正苦于以下问题:Java RexDynamicParam类的具体用法?Java RexDynamicParam怎么用?Java RexDynamicParam使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



RexDynamicParam类属于org.apache.calcite.rex包,在下文中一共展示了RexDynamicParam类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: convertDynamicParam

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
public RexDynamicParam convertDynamicParam(
	final SqlDynamicParam dynamicParam) {
	// REVIEW jvs 8-Jan-2005:  dynamic params may be encountered out of
	// order.  Should probably cross-check with the count from the parser
	// at the end and make sure they all got filled in.  Why doesn't List
	// have a resize() method?!?  Make this a utility.
	while (dynamicParam.getIndex() >= dynamicParamSqlNodes.size()) {
		dynamicParamSqlNodes.add(null);
	}

	dynamicParamSqlNodes.set(
		dynamicParam.getIndex(),
		dynamicParam);
	return rexBuilder.makeDynamicParam(
		getDynamicParamType(dynamicParam.getIndex()),
		dynamicParam.getIndex());
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:18,代码来源:SqlToRelConverter.java


示例2: isConvertedSubq

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
/**
 * Determines whether a RexNode corresponds to a sub-query that's been
 * converted to a constant.
 *
 * @param rex the expression to be examined
 * @return true if the expression is a dynamic parameter, a literal, or
 * a literal that is being cast
 */
private boolean isConvertedSubq(RexNode rex) {
	if ((rex instanceof RexLiteral)
		|| (rex instanceof RexDynamicParam)) {
		return true;
	}
	if (rex instanceof RexCall) {
		RexCall call = (RexCall) rex;
		if (call.getOperator() == SqlStdOperatorTable.CAST) {
			RexNode operand = call.getOperands().get(0);
			if (operand instanceof RexLiteral) {
				return true;
			}
		}
	}
	return false;
}
 
开发者ID:axbaretto,项目名称:flink,代码行数:25,代码来源:SqlToRelConverter.java


示例3: convertDynamicParam

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
public RexDynamicParam convertDynamicParam(
    final SqlDynamicParam dynamicParam) {
  // REVIEW jvs 8-Jan-2005:  dynamic params may be encountered out of
  // order.  Should probably cross-check with the count from the parser
  // at the end and make sure they all got filled in.  Why doesn't List
  // have a resize() method?!?  Make this a utility.
  while (dynamicParam.getIndex() >= dynamicParamSqlNodes.size()) {
    dynamicParamSqlNodes.add(null);
  }

  dynamicParamSqlNodes.set(
      dynamicParam.getIndex(),
      dynamicParam);
  return rexBuilder.makeDynamicParam(
      getDynamicParamType(dynamicParam.getIndex()),
      dynamicParam.getIndex());
}
 
开发者ID:apache,项目名称:kylin,代码行数:18,代码来源:SqlToRelConverter.java


示例4: isConvertedSubq

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
/**
 * Determines whether a RexNode corresponds to a sub-query that's been
 * converted to a constant.
 *
 * @param rex the expression to be examined
 * @return true if the expression is a dynamic parameter, a literal, or
 * a literal that is being cast
 */
private boolean isConvertedSubq(RexNode rex) {
  if ((rex instanceof RexLiteral)
      || (rex instanceof RexDynamicParam)) {
    return true;
  }
  if (rex instanceof RexCall) {
    RexCall call = (RexCall) rex;
    if (call.getOperator() == SqlStdOperatorTable.CAST) {
      RexNode operand = call.getOperands().get(0);
      if (operand instanceof RexLiteral) {
        return true;
      }
    }
  }
  return false;
}
 
开发者ID:apache,项目名称:kylin,代码行数:25,代码来源:SqlToRelConverter.java


示例5: getExpression

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
private static Expression getExpression(RexNode offset) {
  if (offset instanceof RexDynamicParam) {
    final RexDynamicParam param = (RexDynamicParam) offset;
    return Expressions.convert_(
        Expressions.call(DataContext.ROOT,
            BuiltInMethod.DATA_CONTEXT_GET.method,
            Expressions.constant("?" + param.getIndex())),
        Integer.class);
  } else {
    return Expressions.constant(RexLiteral.intValue(offset));
  }
}
 
开发者ID:apache,项目名称:calcite,代码行数:13,代码来源:EnumerableLimit.java


示例6: translateParameter

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
/** Translates a parameter. */
private Expression translateParameter(RexDynamicParam expr,
    RexImpTable.NullAs nullAs, Type storageType) {
  if (storageType == null) {
    storageType = typeFactory.getJavaClass(expr.getType());
  }
  return nullAs.handle(
      convert(
          Expressions.call(root, BuiltInMethod.DATA_CONTEXT_GET.method,
              Expressions.constant("?" + expr.getIndex())),
          storageType));
}
 
开发者ID:apache,项目名称:calcite,代码行数:13,代码来源:RexToLixTranslator.java


示例7: checkExponentialCnf

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
private void checkExponentialCnf(int n) {
  final RelDataType booleanType =
      typeFactory.createSqlType(SqlTypeName.BOOLEAN);
  final RelDataTypeFactory.Builder builder = typeFactory.builder();
  for (int i = 0; i < n; i++) {
    builder.add("x" + i, booleanType)
        .add("y" + i, booleanType);
  }
  final RelDataType rowType3 = builder.build();
  final RexDynamicParam range3 = rexBuilder.makeDynamicParam(rowType3, 0);
  final List<RexNode> list = Lists.newArrayList();
  for (int i = 0; i < n; i++) {
    list.add(
        and(rexBuilder.makeFieldAccess(range3, i * 2),
            rexBuilder.makeFieldAccess(range3, i * 2 + 1)));
  }
  final RexNode cnf = RexUtil.toCnf(rexBuilder, or(list));
  final int nodeCount = nodeCount(cnf);
  assertThat((n + 1) * (int) Math.pow(2, n) + 1, equalTo(nodeCount));
  if (n == 3) {
    assertThat(cnf.toString(),
        equalTo("AND(OR(?0.x0, ?0.x1, ?0.x2), OR(?0.x0, ?0.x1, ?0.y2),"
            + " OR(?0.x0, ?0.y1, ?0.x2), OR(?0.x0, ?0.y1, ?0.y2),"
            + " OR(?0.y0, ?0.x1, ?0.x2), OR(?0.y0, ?0.x1, ?0.y2),"
            + " OR(?0.y0, ?0.y1, ?0.x2), OR(?0.y0, ?0.y1, ?0.y2))"));
  }
}
 
开发者ID:apache,项目名称:calcite,代码行数:28,代码来源:RexProgramTest.java


示例8: visitDynamicParam

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
public Void visitDynamicParam(RexDynamicParam dynamicParam) {
  return pushVariable();
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:4,代码来源:FindPartitionConditions.java


示例9: visitDynamicParam

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
@Override
public RexNode visitDynamicParam(RexDynamicParam dynamicParam) {
  return dynamicParam;
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:5,代码来源:RewriteAsBinaryOperators.java


示例10: visitDynamicParam

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
@Override
public LogicalExpression visitDynamicParam(RexDynamicParam dynamicParam) {
  return doUnknown(dynamicParam);
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:5,代码来源:DrillOptiq.java


示例11: visitDynamicParam

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
@Override
public Boolean visitDynamicParam(RexDynamicParam dynamicParam) {
  return doUnknown(dynamicParam);
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:5,代码来源:DrillProjectRelBase.java


示例12: visitDynamicParam

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
@Override
public Boolean visitDynamicParam(RexDynamicParam paramRexDynamicParam) {
  return true;
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:5,代码来源:JdbcExpressionCheck.java


示例13: visitDynamicParam

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
@Override
public Boolean visitDynamicParam(RexDynamicParam dynamicParam) {
  return true;
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:5,代码来源:RewriteProjectToFlattenRule.java


示例14: visitDynamicParam

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
@Override
public StateHolder visitDynamicParam(RexDynamicParam dynamicParam) {
  return new StateHolder(Type.OTHER, dynamicParam);
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:5,代码来源:FindSimpleFilters.java


示例15: visitDynamicParam

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
@Override
public Boolean visitDynamicParam(RexDynamicParam dynamicParam) {
  return false;
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:5,代码来源:MoreRelOptUtil.java


示例16: visitDynamicParam

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
@Override
public Expression visitDynamicParam(RexDynamicParam dynamicParam) {
  return super.visitDynamicParam(dynamicParam);
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:5,代码来源:PredicateAnalyzer.java


示例17: visitDynamicParam

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
@Override
public List<List<String>> visitDynamicParam(RexDynamicParam dynamicParam) {
  return visitUnknown(dynamicParam);
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:5,代码来源:ElasticSourceNameFinder.java


示例18: visitDynamicParam

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
@Override
public FunctionRender visitDynamicParam(RexDynamicParam dynamicParam) {
  return visitUnknown(dynamicParam);
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:5,代码来源:ProjectAnalyzer.java


示例19: visitDynamicParam

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
@Override
public TupleFilter visitDynamicParam(RexDynamicParam dynamicParam) {
    String name = dynamicParam.getName();
    TupleFilter filter = new DynamicTupleFilter(name);
    return filter;
}
 
开发者ID:apache,项目名称:kylin,代码行数:7,代码来源:OLAPFilterRel.java


示例20: visitDynamicParam

import org.apache.calcite.rex.RexDynamicParam; //导入依赖的package包/类
@Override public Void visitDynamicParam(RexDynamicParam dynamicParam) {
  return pushVariable();
}
 
开发者ID:apache,项目名称:calcite,代码行数:4,代码来源:ReduceExpressionsRule.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java WorkspaceResourceDialog类代码示例发布时间:2022-05-23
下一篇:
Java JXTitledPanel类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap