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


Java SubQueryRemoveRule类代码示例

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


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

示例1: testCustomColumnResolvingInNonCorrelatedSubQuery

import org.apache.calcite.rel.rules.SubQueryRemoveRule; //导入依赖的package包/类
@Test public void testCustomColumnResolvingInNonCorrelatedSubQuery() {
  final String sql = "select *\n"
      + "from struct.t t1\n"
      + "where c0 in (\n"
      + "  select f1.c0 from struct.t t2)";
  final HepProgram program = new HepProgramBuilder()
      .addRuleInstance(SubQueryRemoveRule.PROJECT)
      .addRuleInstance(SubQueryRemoveRule.FILTER)
      .addRuleInstance(SubQueryRemoveRule.JOIN)
      .build();
  sql(sql)
      .withTrim(true)
      .expand(false)
      .with(program)
      .check();
}
 
开发者ID:apache,项目名称:calcite,代码行数:17,代码来源:RelOptRulesTest.java

示例2: testCustomColumnResolvingInCorrelatedSubQuery

import org.apache.calcite.rel.rules.SubQueryRemoveRule; //导入依赖的package包/类
@Test public void testCustomColumnResolvingInCorrelatedSubQuery() {
  final String sql = "select *\n"
      + "from struct.t t1\n"
      + "where c0 = (\n"
      + "  select max(f1.c0) from struct.t t2 where t1.k0 = t2.k0)";
  final HepProgram program = new HepProgramBuilder()
      .addRuleInstance(SubQueryRemoveRule.PROJECT)
      .addRuleInstance(SubQueryRemoveRule.FILTER)
      .addRuleInstance(SubQueryRemoveRule.JOIN)
      .build();
  sql(sql)
      .withTrim(true)
      .expand(false)
      .with(program)
      .check();
}
 
开发者ID:apache,项目名称:calcite,代码行数:17,代码来源:RelOptRulesTest.java

示例3: testCustomColumnResolvingInCorrelatedSubQuery2

import org.apache.calcite.rel.rules.SubQueryRemoveRule; //导入依赖的package包/类
@Test public void testCustomColumnResolvingInCorrelatedSubQuery2() {
  final String sql = "select *\n"
      + "from struct.t t1\n"
      + "where c0 in (\n"
      + "  select f1.c0 from struct.t t2 where t1.c2 = t2.c2)";
  final HepProgram program = new HepProgramBuilder()
      .addRuleInstance(SubQueryRemoveRule.PROJECT)
      .addRuleInstance(SubQueryRemoveRule.FILTER)
      .addRuleInstance(SubQueryRemoveRule.JOIN)
      .build();
  sql(sql)
      .withTrim(true)
      .expand(false)
      .with(program)
      .check();
}
 
开发者ID:apache,项目名称:calcite,代码行数:17,代码来源:RelOptRulesTest.java

示例4: subQuery

import org.apache.calcite.rel.rules.SubQueryRemoveRule; //导入依赖的package包/类
public static Program subQuery(RelMetadataProvider metadataProvider) {
  return hep(
      ImmutableList.of((RelOptRule) SubQueryRemoveRule.FILTER,
          SubQueryRemoveRule.PROJECT,
          SubQueryRemoveRule.JOIN, OLAPJoinPushThroughJoinRule.INSTANCE,
          OLAPJoinPushThroughJoinRule2.INSTANCE), true, metadataProvider);
}
 
开发者ID:apache,项目名称:kylin,代码行数:8,代码来源:Programs.java

示例5: checkSubQuery

import org.apache.calcite.rel.rules.SubQueryRemoveRule; //导入依赖的package包/类
private Sql checkSubQuery(String sql) {
  final HepProgram program = new HepProgramBuilder()
      .addRuleInstance(SubQueryRemoveRule.PROJECT)
      .addRuleInstance(SubQueryRemoveRule.FILTER)
      .addRuleInstance(SubQueryRemoveRule.JOIN)
      .build();
  return sql(sql).with(new HepPlanner(program)).expand(false);
}
 
开发者ID:apache,项目名称:calcite,代码行数:9,代码来源:RelOptRulesTest.java

示例6: subQuery

import org.apache.calcite.rel.rules.SubQueryRemoveRule; //导入依赖的package包/类
public static Program subQuery(RelMetadataProvider metadataProvider) {
  return hep(
      ImmutableList.of((RelOptRule) SubQueryRemoveRule.FILTER,
          SubQueryRemoveRule.PROJECT,
          SubQueryRemoveRule.JOIN), true, metadataProvider);
}
 
开发者ID:apache,项目名称:calcite,代码行数:7,代码来源:Programs.java


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