congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
org.apache.calcite.rel
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.calcite.rel

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

origin: apache/hive

public void validate(RelNode relNode) {
 try {
  relNode.accept(this);
 } catch (Util.FoundOne e) {
  // Can ignore - the check failed.
 }
}
origin: apache/hive

 public void visit(
   RelNode node,
   int ordinal,
   RelNode parent) {
  if (node instanceof JdbcHiveTableScan && tmpJdbcHiveTableScan [0] == null) {
   tmpJdbcHiveTableScan [0] = (JdbcHiveTableScan) node;
  } else {
   super.visit(node, ordinal, parent);
  }
 }
}.go(this);
origin: apache/drill

MutableLeafRel(MutableRelType type, RelNode rel) {
 super(rel.getCluster(), rel.getRowType(), type);
 this.rel = rel;
}
origin: apache/hive

/**
 * Creates a HiveSortExchange.
 *
 * @param input     Input relational expression
 * @param distribution Distribution specification
 * @param collation Collation specification
 * @param joinKeys Join Keys specification
 */
public static HiveSortExchange create(RelNode input,
  RelDistribution distribution, RelCollation collation, ImmutableList<RexNode> joinKeys) {
 RelOptCluster cluster = input.getCluster();
 distribution = RelDistributionTraitDef.INSTANCE.canonize(distribution);
 collation = RelCollationTraitDef.INSTANCE.canonize(collation);
 RelTraitSet traitSet = RelTraitSet.createEmpty().plus(distribution).plus(collation);
 return new HiveSortExchange(cluster, traitSet, input, distribution, collation, joinKeys);
}
origin: apache/kylin

@Override
public RelWriter explainTerms(RelWriter pw) {
  return super.explainTerms(pw)
      .item("ctx", context == null ? "" : String.valueOf(context.id) + "@" + context.realization)
      .itemIf("offset", localOffset, localOffset != null).itemIf("fetch", localFetch, localFetch != null);
}
origin: apache/incubator-druid

public RelDataType getRowType()
{
 return leafRel().getRowType();
}
origin: apache/hive

@Override public RelWriter explainTerms(RelWriter pw) {
 if (this.useQBIdInDigest) {
  // TODO: Only the qualified name should be left here
  return super.explainTerms(pw)
    .item("qbid:alias", concatQbIDAlias);
 } else {
  return super.explainTerms(pw).item("table:alias", tblAlias);
 }
}
origin: apache/drill

@Override
public RelWriter explainTerms(RelWriter pw) {
 return super.explainTerms(pw).item("sql", stripToOneLineSql(sql));
}
origin: apache/drill

@Override
public RelNode visit(RelNode other) {
 if (other instanceof RelSubset) {
  return ((RelSubset) other).getBest().accept(this);
 } else {
  return super.visit(other);
 }
}
origin: apache/hive

@Override
public RelWriter explainTerms(RelWriter pw) {
 return super.explainTerms(pw)
   .item("algorithm", joinAlgorithm == null ?
       "none" : joinAlgorithm)
   .item("cost", joinCost == null ?
       "not available" : joinCost);
}
origin: apache/storm

private Statistic buildStatistic() {
  if (stats != null || primaryKey == -1) {
    return stats;
  }
  Direction dir = primaryKeyMonotonicity == INCREASING ? ASCENDING : DESCENDING;
  RelFieldCollation collation = new RelFieldCollation(primaryKey, dir, NullDirection.UNSPECIFIED);
  return Statistics.of(fields.size(), ImmutableList.of(ImmutableBitSet.of(primaryKey)),
             ImmutableList.of(RelCollations.of(collation)));
}
origin: apache/incubator-druid

public RelTrait[] getRelTraits()
{
 return leafRel().getTraitSet().toArray(new RelTrait[0]);
}
origin: apache/hive

private RelNode getCorRel(CorRef corVar) {
 final RelNode r = cm.mapCorToCorRel.get(corVar.corr);
 RelNode ret = r.getInput(0);
 return ret;
}
origin: apache/incubator-druid

@Override
public boolean matches(final RelOptRuleCall call)
{
 // LIMIT, no ORDER BY
 final Sort sort = call.rel(0);
 return sort.collation.getFieldCollations().isEmpty() && sort.fetch != null;
}
origin: apache/hive

@Override
public int compareTo(RelMultipleTrait o) {
 final RelDistribution distribution = (RelDistribution) o;
 if (type == distribution.getType()
   && (type == Type.HASH_DISTRIBUTED
     || type == Type.RANGE_DISTRIBUTED)) {
  return ORDERING.compare(getKeys(), distribution.getKeys());
 }
 return type.compareTo(distribution.getType());
}
origin: apache/hive

@Override public RelNode accept(RelShuttle shuttle) {
 if(shuttle instanceof HiveRelShuttle) {
  return ((HiveRelShuttle)shuttle).visit(this);
 }
 return shuttle.visit(this);
}
origin: apache/incubator-druid

@Override
public RelOptCost computeSelfCost(final RelOptPlanner planner, final RelMetadataQuery mq)
{
 return right.computeSelfCost(planner, mq).plus(left.computeSelfCost(planner, mq).multiplyBy(50));
}
origin: apache/hive

 public boolean traverse(RelNode root) {
  root.accept(this);
  return mightRequireValueGen;
 }
}
origin: apache/hive

@Override
public void visit(RelNode node, int ordinal, RelNode parent) {
 if (node instanceof Project ||
   node instanceof Filter ||
   node instanceof TableScan) {
  // We can continue
  super.visit(node, ordinal, parent);
 } else {
  throw new ReturnedValue(false);
 }
}
origin: apache/hive

@Override public RelNode accept(RelShuttle shuttle) {
 if(shuttle instanceof HiveRelShuttle) {
  return ((HiveRelShuttle)shuttle).visit(this);
 }
 return shuttle.visit(this);
}
org.apache.calcite.rel

Most used classes

  • RelDataType
    RelDataType represents the type of a scalar expression or entire row returned from a relational expr
  • RelDataTypeFactory
    RelDataTypeFactory is a factory for datatype descriptors. It defines methods for instantiating and c
  • RelNode
    A RelNode is a relational expression.Relational expressions process data, so their names are typical
  • RelDataTypeField
    RelDataTypeField represents the definition of a field in a structured RelDataType.Extends the java.u
  • AggregateCall
    Call to an aggregate function within an org.apache.calcite.rel.core.Aggregate.
  • LogicalFilter,
  • LogicalProject,
  • RelDataTypeFactory$FieldInfoBuilder,
  • Project,
  • RelFieldCollation,
  • RelWriter,
  • Aggregate,
  • Filter,
  • RelCollation,
  • LogicalAggregate,
  • RelMetadataQuery,
  • Join,
  • Sort,
  • RelRecordType
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