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

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

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

origin: Qihoo360/Quicksql

public Double getRowCount(SemiJoin rel, RelMetadataQuery mq) {
 // create a RexNode representing the selectivity of the
 // semijoin filter and pass it to getSelectivity
 RexNode semiJoinSelectivity =
   RelMdUtil.makeSemiJoinSelectivityRexNode(mq, rel);
 return NumberUtil.multiply(
   mq.getSelectivity(rel.getLeft(), semiJoinSelectivity),
   mq.getRowCount(rel.getLeft()));
}
origin: org.apache.calcite/calcite-core

public Double getRowCount(SemiJoin rel, RelMetadataQuery mq) {
 // create a RexNode representing the selectivity of the
 // semijoin filter and pass it to getSelectivity
 RexNode semiJoinSelectivity =
   RelMdUtil.makeSemiJoinSelectivityRexNode(mq, rel);
 return NumberUtil.multiply(
   mq.getSelectivity(rel.getLeft(), semiJoinSelectivity),
   mq.getRowCount(rel.getLeft()));
}
origin: Qihoo360/Quicksql

public Double getSelectivity(SemiJoin rel, RelMetadataQuery mq,
  RexNode predicate) {
 // create a RexNode representing the selectivity of the
 // semijoin filter and pass it to getSelectivity
 RexBuilder rexBuilder = rel.getCluster().getRexBuilder();
 RexNode newPred = RelMdUtil.makeSemiJoinSelectivityRexNode(mq, rel);
 if (predicate != null) {
  newPred =
    rexBuilder.makeCall(
      SqlStdOperatorTable.AND,
      newPred,
      predicate);
 }
 return mq.getSelectivity(rel.getLeft(), newPred);
}
origin: org.apache.calcite/calcite-core

public Double getSelectivity(SemiJoin rel, RelMetadataQuery mq,
  RexNode predicate) {
 // create a RexNode representing the selectivity of the
 // semijoin filter and pass it to getSelectivity
 RexBuilder rexBuilder = rel.getCluster().getRexBuilder();
 RexNode newPred = RelMdUtil.makeSemiJoinSelectivityRexNode(mq, rel);
 if (predicate != null) {
  newPred =
    rexBuilder.makeCall(
      SqlStdOperatorTable.AND,
      newPred,
      predicate);
 }
 return mq.getSelectivity(rel.getLeft(), newPred);
}
origin: org.apache.calcite/calcite-core

public Double getDistinctRowCount(SemiJoin rel, RelMetadataQuery mq,
  ImmutableBitSet groupKey, RexNode predicate) {
 if (predicate == null || predicate.isAlwaysTrue()) {
  if (groupKey.isEmpty()) {
   return 1D;
  }
 }
 // create a RexNode representing the selectivity of the
 // semijoin filter and pass it to getDistinctRowCount
 RexNode newPred = RelMdUtil.makeSemiJoinSelectivityRexNode(mq, rel);
 if (predicate != null) {
  RexBuilder rexBuilder = rel.getCluster().getRexBuilder();
  newPred =
    rexBuilder.makeCall(
      SqlStdOperatorTable.AND,
      newPred,
      predicate);
 }
 return mq.getDistinctRowCount(rel.getLeft(), groupKey, newPred);
}
origin: Qihoo360/Quicksql

public Double getDistinctRowCount(SemiJoin rel, RelMetadataQuery mq,
  ImmutableBitSet groupKey, RexNode predicate) {
 if (predicate == null || predicate.isAlwaysTrue()) {
  if (groupKey.isEmpty()) {
   return 1D;
  }
 }
 // create a RexNode representing the selectivity of the
 // semijoin filter and pass it to getDistinctRowCount
 RexNode newPred = RelMdUtil.makeSemiJoinSelectivityRexNode(mq, rel);
 if (predicate != null) {
  RexBuilder rexBuilder = rel.getCluster().getRexBuilder();
  newPred =
    rexBuilder.makeCall(
      SqlStdOperatorTable.AND,
      newPred,
      predicate);
 }
 return mq.getDistinctRowCount(rel.getLeft(), groupKey, newPred);
}
org.apache.calcite.rel.metadataRelMdUtilmakeSemiJoinSelectivityRexNode

Javadoc

Creates a RexNode that stores a selectivity value corresponding to the selectivity of a semijoin. This can be added to a filter to simulate the effect of the semijoin during costing, but should never appear in a real plan since it has no physical implementation.

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

Popular in Java

  • Start an intent from android
  • runOnUiThread (Activity)
  • setContentView (Activity)
  • requestLocationUpdates (LocationManager)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Best IntelliJ 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