Tabnine Logo
RexProgram.getOutputRowType
Code IndexAdd Tabnine to your IDE (free)

How to use
getOutputRowType
method
in
org.apache.calcite.rex.RexProgram

Best Java code snippets using org.apache.calcite.rex.RexProgram.getOutputRowType (Showing top 20 results out of 315)

origin: org.apache.calcite/calcite-core

private MutableCalc(MutableRel input, RexProgram program) {
 super(MutableRelType.CALC, program.getOutputRowType(), input);
 this.program = program;
}
origin: Qihoo360/Quicksql

private MutableCalc(MutableRel input, RexProgram program) {
 super(MutableRelType.CALC, program.getOutputRowType(), input);
 this.program = program;
}
origin: Qihoo360/Quicksql

public JdbcCalc(RelOptCluster cluster,
  RelTraitSet traitSet,
  RelNode input,
  RexProgram program) {
 super(cluster, traitSet, input);
 assert getConvention() instanceof JdbcConvention;
 this.program = program;
 this.rowType = program.getOutputRowType();
}
origin: org.apache.calcite/calcite-core

public JdbcCalc(RelOptCluster cluster,
  RelTraitSet traitSet,
  RelNode input,
  RexProgram program) {
 super(cluster, traitSet, input);
 assert getConvention() instanceof JdbcConvention;
 this.program = program;
 this.rowType = program.getOutputRowType();
}
origin: Qihoo360/Quicksql

/**
 * Creates a Calc.
 *
 * @param cluster Cluster
 * @param traits Traits
 * @param child Input relation
 * @param program Calc program
 */
protected Calc(
  RelOptCluster cluster,
  RelTraitSet traits,
  RelNode child,
  RexProgram program) {
 super(cluster, traits, child);
 this.rowType = program.getOutputRowType();
 this.program = program;
 assert isValid(Litmus.THROW, null);
}
origin: org.apache.calcite/calcite-core

/**
 * Creates a Calc.
 *
 * @param cluster Cluster
 * @param traits Traits
 * @param child Input relation
 * @param program Calc program
 */
protected Calc(
  RelOptCluster cluster,
  RelTraitSet traits,
  RelNode child,
  RexProgram program) {
 super(cluster, traits, child);
 this.rowType = program.getOutputRowType();
 this.program = program;
 assert isValid(Litmus.THROW, null);
}
origin: dremio/dremio-oss

public RexProgram copyOf(RexProgram program) {
 return new RexProgram(
  copyOf(program.getInputRowType()),
  copyRexNodes(program.getExprList()),
  Lists.transform(program.getProjectList(), COPY_REX_LOCAL_REF),
  (RexLocalRef) copyOf(program.getCondition()),
  copyOf(program.getOutputRowType())
 );
}
origin: Qihoo360/Quicksql

final RelDataType outputRowType = topProgram.getOutputRowType();
for (Pair<RexLocalRef, String> pair
  : Pair.zip(projectRefList, outputRowType.getFieldNames(), true)) {
assert mergedProg.getOutputRowType() == topProgram.getOutputRowType();
return mergedProg;
origin: org.apache.calcite/calcite-core

final RelDataType outputRowType = topProgram.getOutputRowType();
for (Pair<RexLocalRef, String> pair
  : Pair.zip(projectRefList, outputRowType.getFieldNames(), true)) {
assert mergedProg.getOutputRowType() == topProgram.getOutputRowType();
return mergedProg;
origin: org.apache.calcite/calcite-core

final RexLocalRef conditionRef = program.getCondition();
final List<RexNode> exprs = program.getExprList();
final RelDataType outputRowType = program.getOutputRowType();
return create(
  rexBuilder,
origin: Qihoo360/Quicksql

final RexLocalRef conditionRef = program.getCondition();
final List<RexNode> exprs = program.getExprList();
final RelDataType outputRowType = program.getOutputRowType();
return create(
  rexBuilder,
origin: org.apache.calcite/calcite-core

    bottomCalc.getProgram(),
    topCalc.getCluster().getRexBuilder());
assert mergedProgram.getOutputRowType()
  == topProgram.getOutputRowType();
final Calc newCalc =
  topCalc.copy(
origin: Qihoo360/Quicksql

    bottomCalc.getProgram(),
    topCalc.getCluster().getRexBuilder());
assert mergedProgram.getOutputRowType()
  == topProgram.getOutputRowType();
final Calc newCalc =
  topCalc.copy(
origin: Qihoo360/Quicksql

builder.addProject(
  list.get(index).getIndex(),
  program.getOutputRowType().getFieldNames().get(k++));
origin: org.apache.calcite/calcite-core

builder.addProject(
  list.get(index).getIndex(),
  program.getOutputRowType().getFieldNames().get(k++));
origin: Qihoo360/Quicksql

final RelDataType outputRowType;
if (level == (levelCount - 1)) {
 outputRowType = program.getOutputRowType();
 projectExprOrdinals = new int[projectRefList.size()];
 for (int i = 0; i < projectExprOrdinals.length; i++) {
origin: Qihoo360/Quicksql

 public RelNode accept(RexShuttle shuttle) {
  List<RexNode> oldExprs = program.getExprList();
  List<RexNode> exprs = shuttle.apply(oldExprs);
  List<RexLocalRef> oldProjects = program.getProjectList();
  List<RexLocalRef> projects = shuttle.apply(oldProjects);
  RexLocalRef oldCondition = program.getCondition();
  RexNode condition;
  if (oldCondition != null) {
   condition = shuttle.apply(oldCondition);
   assert condition instanceof RexLocalRef
     : "Invalid condition after rewrite. Expected RexLocalRef, got "
     + condition;
  } else {
   condition = null;
  }
  if (exprs == oldExprs
    && projects == oldProjects
    && condition == oldCondition) {
   return this;
  }
  return copy(traitSet, getInput(),
    new RexProgram(program.getInputRowType(),
      exprs,
      projects,
      (RexLocalRef) condition,
      program.getOutputRowType()));
 }
}
origin: org.apache.calcite/calcite-core

 public RelNode accept(RexShuttle shuttle) {
  List<RexNode> oldExprs = program.getExprList();
  List<RexNode> exprs = shuttle.apply(oldExprs);
  List<RexLocalRef> oldProjects = program.getProjectList();
  List<RexLocalRef> projects = shuttle.apply(oldProjects);
  RexLocalRef oldCondition = program.getCondition();
  RexNode condition;
  if (oldCondition != null) {
   condition = shuttle.apply(oldCondition);
   assert condition instanceof RexLocalRef
     : "Invalid condition after rewrite. Expected RexLocalRef, got "
     + condition;
  } else {
   condition = null;
  }
  if (exprs == oldExprs
    && projects == oldProjects
    && condition == oldCondition) {
   return this;
  }
  return copy(traitSet, getInput(),
    new RexProgram(program.getInputRowType(),
      exprs,
      projects,
      (RexLocalRef) condition,
      program.getOutputRowType()));
 }
}
origin: Qihoo360/Quicksql

public void onMatch(RelOptRuleCall call) {
 LogicalCalc calc = call.rel(0);
 // Expand decimals in every expression in this program. If no
 // expression changes, don't apply the rule.
 final RexProgram program = calc.getProgram();
 if (!RexUtil.requiresDecimalExpansion(program, true)) {
  return;
 }
 final RexBuilder rexBuilder = calc.getCluster().getRexBuilder();
 final RexShuttle shuttle = new DecimalShuttle(rexBuilder);
 RexProgramBuilder programBuilder =
   RexProgramBuilder.create(
     rexBuilder,
     calc.getInput().getRowType(),
     program.getExprList(),
     program.getProjectList(),
     program.getCondition(),
     program.getOutputRowType(),
     shuttle,
     true);
 final RexProgram newProgram = programBuilder.getProgram();
 LogicalCalc newCalc = LogicalCalc.create(calc.getInput(), newProgram);
 call.transformTo(newCalc);
}
origin: org.apache.calcite/calcite-core

public void onMatch(RelOptRuleCall call) {
 LogicalCalc calc = call.rel(0);
 // Expand decimals in every expression in this program. If no
 // expression changes, don't apply the rule.
 final RexProgram program = calc.getProgram();
 if (!RexUtil.requiresDecimalExpansion(program, true)) {
  return;
 }
 final RexBuilder rexBuilder = calc.getCluster().getRexBuilder();
 final RexShuttle shuttle = new DecimalShuttle(rexBuilder);
 RexProgramBuilder programBuilder =
   RexProgramBuilder.create(
     rexBuilder,
     calc.getInput().getRowType(),
     program.getExprList(),
     program.getProjectList(),
     program.getCondition(),
     program.getOutputRowType(),
     shuttle,
     true);
 final RexProgram newProgram = programBuilder.getProgram();
 LogicalCalc newCalc = LogicalCalc.create(calc.getInput(), newProgram);
 call.transformTo(newCalc);
}
org.apache.calcite.rexRexProgramgetOutputRowType

Javadoc

Returns the type of the output row from this program.

Popular methods of RexProgram

  • expandLocalRef
    Fully expands a RexLocalRef back into a pure RexNode tree containing no RexLocalRefs (reversing the
  • getCondition
    Returns the field reference of this program's filter condition, or null if there is no condition.
  • getInputRowType
    Returns the type of the input row to the program.
  • getProjectList
    Returns an array of references to the expressions which this program is to project. Never null, may
  • create
    Creates a program which calculates projections and filters rows based upon a condition. Does not att
  • getExprList
    Returns the common sub-expressions of this program.The list is never null but may be empty; each the
  • normalize
  • toString
  • <init>
    Creates a program.The expressions must be valid: they must not contain common expressions, forward r
  • containsAggs
    Returns whether this program contains windowed aggregate functions
  • getExprCount
    Returns the number of expressions in this program.
  • collectExplainTerms
    Collects the expressions in this program into a list of terms and values.
  • getExprCount,
  • collectExplainTerms,
  • countTrivial,
  • createIdentity,
  • deduceCollations,
  • explainCalc,
  • getCollations,
  • getPermutation,
  • getSourceField

Popular in Java

  • Reactive rest calls using spring rest template
  • getContentResolver (Context)
  • setRequestProperty (URLConnection)
  • addToBackStack (FragmentTransaction)
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Github Copilot alternatives
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