Tabnine Logo
Window.getInput
Code IndexAdd Tabnine to your IDE (free)

How to use
getInput
method
in
org.apache.calcite.rel.core.Window

Best Java code snippets using org.apache.calcite.rel.core.Window.getInput (Showing top 12 results out of 315)

origin: apache/kylin

  @Override
  public RelNode convert(RelNode rel) {
    final Window window = (Window) rel;
    final RelTraitSet traitSet = window.getTraitSet().replace(OLAPRel.CONVENTION);
    final RelNode input = window.getInput();
    return new OLAPWindowRel(rel.getCluster(), traitSet,
        convert(input, input.getTraitSet().replace(OLAPRel.CONVENTION)), window.constants, window.getRowType(),
        window.groups);
  }
}
origin: Qihoo360/Quicksql

public ImmutableList<RelCollation> collations(Window rel,
  RelMetadataQuery mq) {
 return ImmutableList.copyOf(window(mq, rel.getInput(), rel.groups));
}
origin: org.apache.calcite/calcite-core

public ImmutableList<RelCollation> collations(Window rel,
  RelMetadataQuery mq) {
 return ImmutableList.copyOf(window(mq, rel.getInput(), rel.groups));
}
origin: org.apache.calcite/calcite-core

@Override public RelOptCost computeSelfCost(RelOptPlanner planner,
  RelMetadataQuery mq) {
 // Cost is proportional to the number of rows and the number of
 // components (groups and aggregate functions). There is
 // no I/O cost.
 //
 // TODO #1. Add memory cost.
 // TODO #2. MIN and MAX have higher CPU cost than SUM and COUNT.
 final double rowsIn = mq.getRowCount(getInput());
 int count = groups.size();
 for (Group group : groups) {
  count += group.aggCalls.size();
 }
 return planner.getCostFactory().makeCost(rowsIn, rowsIn * count, 0);
}
origin: Qihoo360/Quicksql

@Override public RelOptCost computeSelfCost(RelOptPlanner planner,
  RelMetadataQuery mq) {
 // Cost is proportional to the number of rows and the number of
 // components (groups and aggregate functions). There is
 // no I/O cost.
 //
 // TODO #1. Add memory cost.
 // TODO #2. MIN and MAX have higher CPU cost than SUM and COUNT.
 final double rowsIn = mq.getRowCount(getInput());
 int count = groups.size();
 for (Group group : groups) {
  count += group.aggCalls.size();
 }
 return planner.getCostFactory().makeCost(rowsIn, rowsIn * count, 0);
}
origin: Qihoo360/Quicksql

 /**
  * Presents a view of the {@link RexWinAggCall} list as a list of
  * {@link AggregateCall}.
  */
 public List<AggregateCall> getAggregateCalls(Window windowRel) {
  final List<String> fieldNames =
    Util.skip(windowRel.getRowType().getFieldNames(),
      windowRel.getInput().getRowType().getFieldCount());
  return new AbstractList<AggregateCall>() {
   public int size() {
    return aggCalls.size();
   }
   public AggregateCall get(int index) {
    final RexWinAggCall aggCall = aggCalls.get(index);
    final SqlAggFunction op = (SqlAggFunction) aggCall.getOperator();
    return AggregateCall.create(op, aggCall.distinct,
      false, getProjectOrdinals(aggCall.getOperands()), -1,
      aggCall.getType(), fieldNames.get(aggCall.ordinal));
   }
  };
 }
}
origin: org.apache.calcite/calcite-core

 /**
  * Presents a view of the {@link RexWinAggCall} list as a list of
  * {@link AggregateCall}.
  */
 public List<AggregateCall> getAggregateCalls(Window windowRel) {
  final List<String> fieldNames =
    Util.skip(windowRel.getRowType().getFieldNames(),
      windowRel.getInput().getRowType().getFieldCount());
  return new AbstractList<AggregateCall>() {
   public int size() {
    return aggCalls.size();
   }
   public AggregateCall get(int index) {
    final RexWinAggCall aggCall = aggCalls.get(index);
    final SqlAggFunction op = (SqlAggFunction) aggCall.getOperator();
    return AggregateCall.create(op, aggCall.distinct,
      false, getProjectOrdinals(aggCall.getOperands()), -1,
      RelCollations.EMPTY,
      aggCall.getType(), fieldNames.get(aggCall.ordinal));
   }
  };
 }
}
origin: Qihoo360/Quicksql

final RelDataType childRowType = getInput().getRowType();
origin: org.apache.calcite/calcite-core

final RelDataType childRowType = getInput().getRowType();
origin: org.apache.kylin/kylin-query

  @Override
  public RelNode convert(RelNode rel) {
    final Window window = (Window) rel;
    final RelTraitSet traitSet = window.getTraitSet().replace(OLAPRel.CONVENTION);
    final RelNode input = window.getInput();
    return new OLAPWindowRel(rel.getCluster(), traitSet,
        convert(input, input.getTraitSet().replace(OLAPRel.CONVENTION)), window.constants, window.getRowType(),
        window.groups);
  }
}
origin: Qihoo360/Quicksql

final MutableRel input = toMutable(window.getInput());
return MutableWindow.of(window.getRowType(),
  input, window.groups, window.getConstants());
origin: org.apache.calcite/calcite-core

final MutableRel input = toMutable(window.getInput());
return MutableWindow.of(window.getRowType(),
  input, window.groups, window.getConstants());
org.apache.calcite.rel.coreWindowgetInput

Popular methods of Window

  • getRowType
  • computeSelfCost
  • getTraitSet
  • getCluster
  • getConstants
    Returns constants that are additional inputs of current relation.
  • getProjectOrdinals
  • explainTerms

Popular in Java

  • Parsing JSON documents to java classes using gson
  • findViewById (Activity)
  • getSystemService (Context)
  • onCreateOptionsMenu (Activity)
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Stack (java.util)
    Stack is a Last-In/First-Out(LIFO) data structure which represents a stack of objects. It enables u
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • JFrame (javax.swing)
  • JTable (javax.swing)
  • Best plugins for Eclipse
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