Tabnine Logo
RelMdUtil.unionPreds
Code IndexAdd Tabnine to your IDE (free)

How to use
unionPreds
method
in
org.apache.calcite.rel.metadata.RelMdUtil

Best Java code snippets using org.apache.calcite.rel.metadata.RelMdUtil.unionPreds (Showing top 2 results out of 315)

origin: Qihoo360/Quicksql

public Double getDistinctRowCount(Filter rel, RelMetadataQuery mq,
  ImmutableBitSet groupKey, RexNode predicate) {
 if (predicate == null || predicate.isAlwaysTrue()) {
  if (groupKey.isEmpty()) {
   return 1D;
  }
 }
 // REVIEW zfong 4/18/06 - In the Broadbase code, duplicates are not
 // removed from the two filter lists.  However, the code below is
 // doing so.
 RexNode unionPreds =
   RelMdUtil.unionPreds(
     rel.getCluster().getRexBuilder(),
     predicate,
     rel.getCondition());
 return mq.getDistinctRowCount(rel.getInput(), groupKey, unionPreds);
}
origin: org.apache.calcite/calcite-core

public Double getDistinctRowCount(Filter rel, RelMetadataQuery mq,
  ImmutableBitSet groupKey, RexNode predicate) {
 if (predicate == null || predicate.isAlwaysTrue()) {
  if (groupKey.isEmpty()) {
   return 1D;
  }
 }
 // REVIEW zfong 4/18/06 - In the Broadbase code, duplicates are not
 // removed from the two filter lists.  However, the code below is
 // doing so.
 RexNode unionPreds =
   RelMdUtil.unionPreds(
     rel.getCluster().getRexBuilder(),
     predicate,
     rel.getCondition());
 return mq.getDistinctRowCount(rel.getInput(), groupKey, unionPreds);
}
org.apache.calcite.rel.metadataRelMdUtilunionPreds

Javadoc

AND's two predicates together, either of which may be null, removing redundant filters.

Popular methods of RelMdUtil

  • guessSelectivity
    Returns default estimates for selectivities, in the absence of stats.
  • areColumnsDefinitelyUnique
    Returns true if the columns represented in a bit mask are definitely known to form a unique column s
  • areColumnsDefinitelyUniqueWhenNullsFiltered
    Returns true if the columns represented in a bit mask are definitely known to form a unique column s
  • getJoinDistinctRowCount
    Computes the number of distinct rows for a set of keys returned from a join. Also known as NDV (numb
  • minusPreds
    Takes the difference between two predicates, removing from the first any predicates also in the seco
  • estimateFilteredRows
  • linear
    Returns a point on a line.The result is always a value between minY and maxY, even if x is not betwe
  • getJoinRowCount
    Returns an estimate of the number of rows returned by a Join.
  • areColumnsUnique
  • areColumnsUniqueWhenNullsFiltered
  • capInfinity
    Caps a double value at Double.MAX_VALUE if it's currently infinity
  • cardOfProjExpr
    Computes the cardinality of a particular expression from the projection list.
  • capInfinity,
  • cardOfProjExpr,
  • checkInputForCollationAndLimit,
  • computeSemiJoinSelectivity,
  • getJoinPopulationSize,
  • getMinusRowCount,
  • getSelectivityValue,
  • getSemiJoinRowCount,
  • getUnionAllRowCount,
  • makeSemiJoinSelectivityRexNode

Popular in Java

  • Making http post requests using okhttp
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • putExtra (Intent)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • BoxLayout (javax.swing)
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Top 12 Jupyter Notebook extensions
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