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

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

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

origin: org.apache.calcite/calcite-core

/**
 * Computes the selectivity of a semijoin filter if it is applied on a fact
 * table. The computation is based on the selectivity of the dimension
 * table/columns and the number of distinct values in the fact table
 * columns.
 *
 * @param factRel fact table participating in the semijoin
 * @param dimRel  dimension table participating in the semijoin
 * @param rel     semijoin rel
 * @return calculated selectivity
 */
public static double computeSemiJoinSelectivity(RelMetadataQuery mq,
  RelNode factRel, RelNode dimRel, SemiJoin rel) {
 return computeSemiJoinSelectivity(mq, factRel, dimRel, rel.getLeftKeys(),
   rel.getRightKeys());
}
origin: Qihoo360/Quicksql

/**
 * Computes the selectivity of a semijoin filter if it is applied on a fact
 * table. The computation is based on the selectivity of the dimension
 * table/columns and the number of distinct values in the fact table
 * columns.
 *
 * @param factRel fact table participating in the semijoin
 * @param dimRel  dimension table participating in the semijoin
 * @param rel     semijoin rel
 * @return calculated selectivity
 */
public static double computeSemiJoinSelectivity(RelMetadataQuery mq,
  RelNode factRel, RelNode dimRel, SemiJoin rel) {
 return computeSemiJoinSelectivity(mq, factRel, dimRel, rel.getLeftKeys(),
   rel.getRightKeys());
}
origin: Qihoo360/Quicksql

/**
 * Computes the selectivity of a semijoin filter if it is applied on a fact
 * table. The computation is based on the selectivity of the dimension
 * table/columns and the number of distinct values in the fact table
 * columns.
 *
 * @param rel semijoin rel
 * @return calculated selectivity
 */
public static double computeSemiJoinSelectivity(RelMetadataQuery mq,
  SemiJoin rel) {
 return computeSemiJoinSelectivity(mq, rel.getLeft(), rel.getRight(),
   rel.getLeftKeys(), rel.getRightKeys());
}
origin: org.apache.calcite/calcite-core

/**
 * Computes the selectivity of a semijoin filter if it is applied on a fact
 * table. The computation is based on the selectivity of the dimension
 * table/columns and the number of distinct values in the fact table
 * columns.
 *
 * @param rel semijoin rel
 * @return calculated selectivity
 */
public static double computeSemiJoinSelectivity(RelMetadataQuery mq,
  SemiJoin rel) {
 return computeSemiJoinSelectivity(mq, rel.getLeft(), rel.getRight(),
   rel.getLeftKeys(), rel.getRightKeys());
}
origin: Qihoo360/Quicksql

/**
 * 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.
 *
 * @param rel the semijoin of interest
 * @return constructed rexnode
 */
public static RexNode makeSemiJoinSelectivityRexNode(RelMetadataQuery mq,
  SemiJoin rel) {
 RexBuilder rexBuilder = rel.getCluster().getRexBuilder();
 double selectivity =
   computeSemiJoinSelectivity(mq, rel.getLeft(), rel.getRight(), rel);
 return rexBuilder.makeCall(ARTIFICIAL_SELECTIVITY_FUNC,
   rexBuilder.makeApproxLiteral(new BigDecimal(selectivity)));
}
origin: org.apache.calcite/calcite-core

/**
 * 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.
 *
 * @param rel the semijoin of interest
 * @return constructed rexnode
 */
public static RexNode makeSemiJoinSelectivityRexNode(RelMetadataQuery mq,
  SemiJoin rel) {
 RexBuilder rexBuilder = rel.getCluster().getRexBuilder();
 double selectivity =
   computeSemiJoinSelectivity(mq, rel.getLeft(), rel.getRight(), rel);
 return rexBuilder.makeCall(ARTIFICIAL_SELECTIVITY_FUNC,
   rexBuilder.makeApproxLiteral(new BigDecimal(selectivity)));
}
origin: org.apache.calcite/calcite-core

  RelMdUtil.computeSemiJoinSelectivity(mq, factRel, dimRel, semiJoin);
if (selectivity > .5) {
 return 0;
origin: Qihoo360/Quicksql

  RelMdUtil.computeSemiJoinSelectivity(mq, factRel, dimRel, semiJoin);
if (selectivity > .5) {
 return 0;
org.apache.calcite.rel.metadataRelMdUtilcomputeSemiJoinSelectivity

Javadoc

Computes the selectivity of a semijoin filter if it is applied on a fact table. The computation is based on the selectivity of the dimension table/columns and the number of distinct values in the fact table columns.

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,
  • getJoinPopulationSize,
  • getMinusRowCount,
  • getSelectivityValue,
  • getSemiJoinRowCount,
  • getUnionAllRowCount,
  • makeSemiJoinSelectivityRexNode

Popular in Java

  • Finding current android device location
  • findViewById (Activity)
  • scheduleAtFixedRate (Timer)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • GridLayout (java.awt)
    The GridLayout class is a layout manager that lays out a container's components in a rectangular gri
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • JButton (javax.swing)
  • JTextField (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • 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