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

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

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

origin: org.apache.calcite/calcite-core

/**
 * Returns whether this program returns its input exactly.
 *
 * <p>This is a stronger condition than {@link #projectsIdentity(boolean)}.
 */
public boolean isTrivial() {
 return getCondition() == null && projectsOnlyIdentity();
}
origin: Qihoo360/Quicksql

/**
 * Returns whether this program returns its input exactly.
 *
 * <p>This is a stronger condition than {@link #projectsIdentity(boolean)}.
 */
public boolean isTrivial() {
 return getCondition() == null && projectsOnlyIdentity();
}
origin: Qihoo360/Quicksql

 @Override protected RelNode handle(RelNode rel) {
  if (!(rel instanceof LogicalCalc)) {
   return rel;
  }
  final LogicalCalc calc = (LogicalCalc) rel;
  final RexProgram program = calc.getProgram();
  relBuilder.push(calc.getInput());
  if (program.getCondition() != null) {
   relBuilder.filter(
     program.expandLocalRef(program.getCondition()));
  }
  if (!program.projectsOnlyIdentity()) {
   relBuilder.project(
     Lists.transform(program.getProjectList(),
       program::expandLocalRef),
     calc.getRowType().getFieldNames());
  }
  return relBuilder.build();
 }
};
origin: org.apache.calcite/calcite-core

 @Override protected RelNode handle(RelNode rel) {
  if (!(rel instanceof LogicalCalc)) {
   return rel;
  }
  final LogicalCalc calc = (LogicalCalc) rel;
  final RexProgram program = calc.getProgram();
  relBuilder.push(calc.getInput());
  if (program.getCondition() != null) {
   relBuilder.filter(
     program.expandLocalRef(program.getCondition()));
  }
  if (!program.projectsOnlyIdentity()) {
   relBuilder.project(
     Lists.transform(program.getProjectList(),
       program::expandLocalRef),
     calc.getRowType().getFieldNames());
  }
  return relBuilder.build();
 }
};
org.apache.calcite.rexRexProgramprojectsOnlyIdentity

Javadoc

Returns whether this program projects precisely its input fields. It may or may not apply a condition.

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.
  • getOutputRowType
    Returns the type of the output row from this program.
  • getExprCount,
  • getOutputRowType,
  • collectExplainTerms,
  • countTrivial,
  • createIdentity,
  • deduceCollations,
  • explainCalc,
  • getCollations,
  • getPermutation,
  • getSourceField

Popular in Java

  • Creating JSON documents from java classes using gson
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • setContentView (Activity)
  • compareTo (BigDecimal)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • JOptionPane (javax.swing)
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Loader (org.hibernate.loader)
    Abstract superclass of object loading (and querying) strategies. This class implements useful common
  • Top Sublime Text plugins
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