本文整理汇总了Java中org.apache.calcite.sql2rel.StandardConvertletTable类的典型用法代码示例。如果您正苦于以下问题:Java StandardConvertletTable类的具体用法?Java StandardConvertletTable怎么用?Java StandardConvertletTable使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StandardConvertletTable类属于org.apache.calcite.sql2rel包,在下文中一共展示了StandardConvertletTable类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: buildPlanner
import org.apache.calcite.sql2rel.StandardConvertletTable; //导入依赖的package包/类
private Planner buildPlanner(QueryContext context) {
final List<RelTraitDef> traitDefs = new ArrayList<RelTraitDef>();
traitDefs.add(ConventionTraitDef.INSTANCE);
traitDefs.add(RelCollationTraitDef.INSTANCE);
final ChainedSqlOperatorTable opTab =
new ChainedSqlOperatorTable(
ImmutableList.of(SqlStdOperatorTable.instance(),
HiveSqlOperatorTable.instance(), catalogReader));
FrameworkConfig config = Frameworks.newConfigBuilder() //
.parserConfig(SqlParser.configBuilder()
.setQuotedCasing(Casing.UNCHANGED)
.setUnquotedCasing(Casing.TO_UPPER)
.setQuoting(Quoting.DOUBLE_QUOTE)
.build()) //
.defaultSchema(context.getDefaultSchema()) //
.operatorTable(opTab) //
.traitDefs(traitDefs) //
.convertletTable(StandardConvertletTable.INSTANCE)//
.programs(getPrograms()) //
.typeSystem(RelDataTypeSystem.DEFAULT) //
.build();
return Frameworks.getPlanner(config);
}
开发者ID:qubole,项目名称:quark,代码行数:24,代码来源:SqlWorker.java
示例2: get
import org.apache.calcite.sql2rel.StandardConvertletTable; //导入依赖的package包/类
@Override
public SqlRexConvertlet get(SqlCall call) {
SqlRexConvertlet convertlet;
if(call.getOperator() instanceof DrillCalciteSqlWrapper) {
final SqlOperator wrapper = call.getOperator();
final SqlOperator wrapped = DrillCalciteWrapperUtility.extractSqlOperatorFromWrapper(call.getOperator());
if ((convertlet = map.get(wrapped)) != null) {
return convertlet;
}
((SqlBasicCall) call).setOperator(wrapped);
SqlRexConvertlet sqlRexConvertlet = StandardConvertletTable.INSTANCE.get(call);
((SqlBasicCall) call).setOperator(wrapper);
return sqlRexConvertlet;
}
if ((convertlet = map.get(call.getOperator())) != null) {
return convertlet;
}
return StandardConvertletTable.INSTANCE.get(call);
}
开发者ID:axbaretto,项目名称:drill,代码行数:23,代码来源:DrillConvertletTable.java
示例3: createSqlToRelConverter
import org.apache.calcite.sql2rel.StandardConvertletTable; //导入依赖的package包/类
protected SqlToRelConverter createSqlToRelConverter(
final SqlValidator validator,
final Prepare.CatalogReader catalogReader,
final RelDataTypeFactory typeFactory,
final SqlToRelConverter.Config config) {
final RexBuilder rexBuilder = new RexBuilder(typeFactory);
RelOptCluster cluster =
RelOptCluster.create(getPlanner(), rexBuilder);
if (clusterFactory != null) {
cluster = clusterFactory.apply(cluster);
}
return new SqlToRelConverter(null, validator, catalogReader, cluster,
StandardConvertletTable.INSTANCE, config);
}
开发者ID:apache,项目名称:calcite,代码行数:15,代码来源:SqlToRelTestBase.java
示例4: get
import org.apache.calcite.sql2rel.StandardConvertletTable; //导入依赖的package包/类
@Override
public SqlRexConvertlet get(SqlCall call) {
SqlRexConvertlet convertlet;
if ((convertlet = map.get(call.getOperator())) != null) {
return convertlet;
}
return StandardConvertletTable.INSTANCE.get(call);
}
开发者ID:skhalifa,项目名称:QDrill,代码行数:12,代码来源:DrillConvertletTable.java
示例5: get
import org.apache.calcite.sql2rel.StandardConvertletTable; //导入依赖的package包/类
@Override
public SqlRexConvertlet get(SqlCall call) {
SqlRexConvertlet convertlet;
if ((convertlet = super.get(call)) != null) {
return convertlet;
}
return StandardConvertletTable.INSTANCE.get(call);
}
开发者ID:dremio,项目名称:dremio-oss,代码行数:11,代码来源:ConvertletTable.java
示例6: createConvertletTable
import org.apache.calcite.sql2rel.StandardConvertletTable; //导入依赖的package包/类
/** Factory method for default convertlet table. */
protected SqlRexConvertletTable createConvertletTable() {
return StandardConvertletTable.INSTANCE;
}
开发者ID:apache,项目名称:kylin,代码行数:5,代码来源:CalcitePrepareImpl.java
注:本文中的org.apache.calcite.sql2rel.StandardConvertletTable类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论