Tabnine Logo
org.apache.calcite.plan
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.calcite.plan

Best Java code snippets using org.apache.calcite.plan (Showing top 20 results out of 324)

origin: apache/hive

public boolean isLe(RelOptCost other) {
 if ( (this.cpu + this.io < other.getCpu() + other.getIo()) ||
    ((this.cpu + this.io == other.getCpu() + other.getIo()) &&
    (this.rowCount <= other.getRows()))) {
  return true;
 }
 return false;
}
origin: apache/incubator-druid

 @Override
 public RelOptCost computeSelfCost(final RelOptPlanner planner, final RelMetadataQuery mq)
 {
  return planner.getCostFactory().makeCost(mq.getRowCount(sourceRel), 0, 0).multiplyBy(10);
 }
}
origin: apache/kylin

@Override
public RelTraitSet replaceTraitSet(RelTrait trait) {
  RelTraitSet oldTraitSet = this.traitSet;
  this.traitSet = this.traitSet.replace(trait);
  return oldTraitSet;
}
origin: apache/incubator-druid

 @Override
 public void onMatch(final RelOptRuleCall call)
 {
  final LogicalTableScan scan = call.rel(0);
  final RelOptTable table = scan.getTable();
  final DruidTable druidTable = table.unwrap(DruidTable.class);
  if (druidTable != null) {
   call.transformTo(
     DruidQueryRel.fullScan(scan, table, druidTable, queryMaker)
   );
  }
 }
}
origin: apache/kylin

@Override
public RelOptCost computeSelfCost(RelOptPlanner planner, RelMetadataQuery mq) {
  RelOptCost relOptCost = super.computeSelfCost(planner, mq).multiplyBy(0.05);
  return planner.getCostFactory().makeCost(relOptCost.getRows(), 0, 0);
}
origin: apache/incubator-druid

@Override
public DruidSemiJoin asBindable()
{
 return new DruidSemiJoin(
   getCluster(),
   getTraitSet().replace(BindableConvention.INSTANCE),
   left,
   RelOptRule.convert(right, BindableConvention.INSTANCE),
   leftExpressions,
   rightKeys,
   maxSemiJoinRowsInMemory,
   getQueryMaker()
 );
}
origin: apache/hive

@Override
public boolean matches(RelOptRuleCall call) {
 final RelNode leftInput = call.rel(2);
 final RelNode rightInput = call.rel(3);
 if (leftInput instanceof Project && rightInput instanceof Project) {
  return false;
 }
 return true;
}
origin: apache/incubator-druid

@Override
public RelOptCost computeSelfCost(final RelOptPlanner planner, final RelMetadataQuery mq)
{
 return planner.getCostFactory().makeCost(rels.stream().mapToDouble(mq::getRowCount).sum(), 0, 0);
}
origin: apache/hive

public JDBCFilterJoinRule() {
 super(RelOptRule.operand(HiveFilter.class,
     RelOptRule.operand(HiveJoin.class,
      RelOptRule.operand(HiveJdbcConverter.class, RelOptRule.any()),
      RelOptRule.operand(HiveJdbcConverter.class, RelOptRule.any()))),
   "JDBCFilterJoinRule", true, HiveRelFactories.HIVE_BUILDER);
}
origin: apache/incubator-druid

@Override
public DruidOuterQueryRel asDruidConvention()
{
 return new DruidOuterQueryRel(
   getCluster(),
   getTraitSet().plus(DruidConvention.instance()),
   RelOptRule.convert(sourceRel, DruidConvention.instance()),
   partialQuery,
   getQueryMaker()
 );
}
origin: apache/incubator-druid

@Override
public DruidOuterQueryRel asBindable()
{
 return new DruidOuterQueryRel(
   getCluster(),
   getTraitSet().plus(BindableConvention.INSTANCE),
   sourceRel,
   partialQuery,
   getQueryMaker()
 );
}
origin: apache/storm

  public static String explain(final RelNode rel, SqlExplainLevel detailLevel) {
    String explain = "";
    try {
      explain = RelOptUtil.toString(rel);
    } catch (StackOverflowError e) {
      LOG.error("StackOverflowError occurred while extracting plan. Please report it to the dev@ mailing list.");
      LOG.error("RelNode " + rel + " ExplainLevel " + detailLevel, e);
      LOG.error("Forcing plan to empty string and continue... SQL Runner may not working properly after.");
    }
    return explain;
  }
}
origin: apache/incubator-druid

@Override
public RelNode toRel(final RelOptTable.ToRelContext context, final RelOptTable table)
{
 return LogicalTableScan.create(context.getCluster(), table);
}
origin: apache/kylin

@Override
public RelTraitSet replaceTraitSet(RelTrait trait) {
  RelTraitSet oldTraitSet = this.traitSet;
  this.traitSet = this.traitSet.replace(trait);
  return oldTraitSet;
}
origin: apache/incubator-druid

@Override
public DruidSemiJoin asDruidConvention()
{
 return new DruidSemiJoin(
   getCluster(),
   getTraitSet().replace(DruidConvention.instance()),
   left,
   RelOptRule.convert(right, DruidConvention.instance()),
   leftExpressions,
   rightKeys,
   maxSemiJoinRowsInMemory,
   getQueryMaker()
 );
}
origin: apache/hive

public boolean equals(RelOptCost other) {
 return (this == other) ||
     ((this.cpu + this.io == other.getCpu() + other.getIo()) &&
     (this.rowCount == other.getRows()));
}
origin: apache/incubator-druid

@Override
public DruidQueryRel asBindable()
{
 return new DruidQueryRel(
   getCluster(),
   getTraitSet().plus(BindableConvention.INSTANCE),
   table,
   druidTable,
   getQueryMaker(),
   partialQuery
 );
}
origin: apache/kylin

@Override
public RelTraitSet replaceTraitSet(RelTrait trait) {
  RelTraitSet oldTraitSet = this.traitSet;
  this.traitSet = this.traitSet.replace(trait);
  return oldTraitSet;
}
origin: apache/kylin

  @Override
  public RelTraitSet replaceTraitSet(RelTrait trait) {
    RelTraitSet oldTraitSet = this.traitSet;
    this.traitSet = this.traitSet.replace(trait);
    return oldTraitSet;
  }
}
origin: apache/kylin

@Override
public RelTraitSet replaceTraitSet(RelTrait trait) {
  RelTraitSet oldTraitSet = this.traitSet;
  this.traitSet = this.traitSet.replace(trait);
  return oldTraitSet;
}
org.apache.calcite.plan

Most used classes

  • RelOptCluster
    An environment for related relational expressions during the optimization of a query.
  • RelOptUtil
    RelOptUtil defines static utility methods for use in optimizing RelNodes.
  • RelOptTable
    Represents a relational dataset in a RelOptSchema. It has methods to describe and implement itself.
  • RelOptPlanner
    A RelOptPlanner is a query optimizer: it transforms a relational expression into a semantically equi
  • RelOptRuleCall
    A RelOptRuleCall is an invocation of a RelOptRule with a set of RelNodes as arguments.
  • RelOptTable$ToRelContext,
  • RelOptCost,
  • HepProgramBuilder,
  • RelOptCostFactory,
  • HepPlanner,
  • RelOptRule,
  • VolcanoPlanner,
  • Context,
  • Contexts,
  • RelOptUtil$InputFinder,
  • RelSubset,
  • RelOptSchema,
  • HepProgram,
  • HepRelVertex
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now