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

How to use org.apache.calcite.rel.logical

Best Java code snippets using org.apache.calcite.rel.logical (Showing top 20 results out of 315)

origin: apache/hive

/**
 * Remove correlated variables from the tree at root corRel.
 *
 * @param correlate Correlator
 */
private void removeCorVarFromTree(LogicalCorrelate correlate) {
 if (cm.mapCorToCorRel.get(correlate.getCorrelationId()) == correlate) {
  cm.mapCorToCorRel.remove(correlate.getCorrelationId());
 }
}
origin: apache/kylin

  @Override
  public RelNode convert(RelNode rel) {
    LogicalValues values = (LogicalValues) rel;
    return OLAPValuesRel.create(values.getCluster(), values.getRowType(), values.getTuples());
  }
}
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 RelNode convert(RelNode rel) {
    LogicalFilter filter = (LogicalFilter) rel;

    RelTraitSet origTraitSet = filter.getTraitSet();
    RelTraitSet traitSet = origTraitSet.replace(OLAPRel.CONVENTION).simplify();

    return new OLAPFilterRel(filter.getCluster(), traitSet,
        convert(filter.getInput(), filter.getInput().getTraitSet().replace(OLAPRel.CONVENTION)),
        filter.getCondition());
  }
}
origin: apache/hive

public RelNode visit(LogicalProject project) {
  return visitChild(project, 0, project.getInput());
}
origin: apache/hive

public RelNode visit(LogicalFilter filter) {
  return visitChild(filter, 0, filter.getInput());
}
origin: apache/hive

public RelNode visit(LogicalAggregate aggregate) {
  return visitChild(aggregate, 0, aggregate.getInput());
}
origin: apache/kylin

  public List<RelCollation> get() {
    //  CALCITE-88
    return RelMdCollation.project(cluster.getMetadataQuery(), convertChild, project.getProjects());
  }
});
origin: apache/kylin

private boolean containsAvg(LogicalAggregate agg) {
  for (AggregateCall call : agg.getAggCallList()) {
    SqlAggFunction func = call.getAggregation();
    if (func instanceof SqlAvgAggFunction)
      return true;
  }
  return false;
}
origin: apache/drill

@Override public RelNode visit(LogicalJoin join) {
 try {
  Stacks.push(stack, join);
  join.getCondition().accept(rexVisitor(join));
 } finally {
  Stacks.pop(stack, join);
 }
 return visitJoin(join);
}
origin: apache/hive

@Override
public RelNode toRel(ToRelContext context) {
 return new LogicalTableScan(context.getCluster(), this);
}
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/incubator-druid

/**
 * Create a DruidQueryRel representing a full scan.
 */
public static DruidQueryRel fullScan(
  final LogicalTableScan scanRel,
  final RelOptTable table,
  final DruidTable druidTable,
  final QueryMaker queryMaker
)
{
 return new DruidQueryRel(
   scanRel.getCluster(),
   scanRel.getCluster().traitSetOf(Convention.NONE),
   table,
   druidTable,
   queryMaker,
   PartialDruidQuery.create(scanRel)
 );
}
origin: apache/drill

public RelNode visit(LogicalProject project) {
  return visitChild(project, 0, project.getInput());
}
origin: apache/drill

public RelNode visit(LogicalFilter filter) {
  return visitChild(filter, 0, filter.getInput());
}
origin: apache/drill

public RelNode visit(LogicalAggregate aggregate) {
  return visitChild(aggregate, 0, aggregate.getInput());
}
origin: apache/drill

/**
 * Remove correlated variables from the tree at root corRel
 *
 * @param correlate Correlator
 */
private void removeCorVarFromTree(LogicalCorrelate correlate) {
 if (cm.mapCorToCorRel.get(correlate.getCorrelationId()) == correlate) {
  cm.mapCorToCorRel.remove(correlate.getCorrelationId());
 }
}
origin: apache/drill

@Override
public RelNode toRel(ToRelContext context) {
 return new LogicalTableScan(context.getCluster(), this);
}
origin: apache/hive

@Override public RelNode visit(LogicalCorrelate correlate) {
 mapCorToCorRel.put(correlate.getCorrelationId(), correlate);
 return visitJoin(correlate);
}
origin: apache/drill

@Override public RelNode visit(LogicalCorrelate correlate) {
 mapCorToCorRel.put(correlate.getCorrelationId(), correlate);
 return visitJoin(correlate);
}
org.apache.calcite.rel.logical

Most used classes

  • LogicalFilter
    Sub-class of org.apache.calcite.rel.core.Filternot targeted at any particular engine or calling conv
  • LogicalProject
    Sub-class of org.apache.calcite.rel.core.Project not targeted at any particular engine or calling co
  • LogicalAggregate
    LogicalAggregate is a relational operator which eliminates duplicates and computes totals.Rules: *
  • LogicalJoin
    Sub-class of org.apache.calcite.rel.core.Joinnot targeted at any particular engine or calling conven
  • LogicalTableScan
    A LogicalTableScan reads all the rows from a RelOptTable.If the table is a net.sf.saffron.ext.JdbcTa
  • LogicalSort,
  • LogicalUnion,
  • LogicalValues,
  • LogicalTableModify,
  • LogicalExchange,
  • LogicalIntersect,
  • LogicalMinus,
  • LogicalTableFunctionScan,
  • LogicalMatch,
  • LogicalWindow,
  • LogicalCalc,
  • LogicalWindow$WindowKey,
  • LogicalSortExchange
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