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

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

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

origin: Qihoo360/Quicksql

/**
 * Computes the population size for a set of keys returned from a join
 *
 * @param joinRel  the join rel
 * @param groupKey keys to compute the population for
 * @return computed population size
 */
public static Double getJoinPopulationSize(RelMetadataQuery mq,
  RelNode joinRel, ImmutableBitSet groupKey) {
 ImmutableBitSet.Builder leftMask = ImmutableBitSet.builder();
 ImmutableBitSet.Builder rightMask = ImmutableBitSet.builder();
 RelNode left = joinRel.getInputs().get(0);
 RelNode right = joinRel.getInputs().get(1);
 // separate the mask into masks for the left and right
 RelMdUtil.setLeftRightBitmaps(
   groupKey, leftMask, rightMask, left.getRowType().getFieldCount());
 Double population =
   NumberUtil.multiply(
     mq.getPopulationSize(left, leftMask.build()),
     mq.getPopulationSize(right, rightMask.build()));
 return numDistinctVals(population, mq.getRowCount(joinRel));
}
origin: org.apache.calcite/calcite-core

/**
 * Computes the population size for a set of keys returned from a join
 *
 * @param joinRel  the join rel
 * @param groupKey keys to compute the population for
 * @return computed population size
 */
public static Double getJoinPopulationSize(RelMetadataQuery mq,
  RelNode joinRel, ImmutableBitSet groupKey) {
 ImmutableBitSet.Builder leftMask = ImmutableBitSet.builder();
 ImmutableBitSet.Builder rightMask = ImmutableBitSet.builder();
 RelNode left = joinRel.getInputs().get(0);
 RelNode right = joinRel.getInputs().get(1);
 // separate the mask into masks for the left and right
 RelMdUtil.setLeftRightBitmaps(
   groupKey, leftMask, rightMask, left.getRowType().getFieldCount());
 Double population =
   NumberUtil.multiply(
     mq.getPopulationSize(left, leftMask.build()),
     mq.getPopulationSize(right, rightMask.build()));
 return numDistinctVals(population, mq.getRowCount(joinRel));
}
origin: org.apache.calcite/calcite-core

RelNode right = joinRel.getInputs().get(1);
RelMdUtil.setLeftRightBitmaps(
  groupKey,
  leftMask,
origin: Qihoo360/Quicksql

RelNode right = joinRel.getInputs().get(1);
RelMdUtil.setLeftRightBitmaps(
  groupKey,
  leftMask,
org.apache.calcite.rel.metadataRelMdUtilsetLeftRightBitmaps

Javadoc

Separates a bit-mask representing a join into masks representing the left and right inputs into the join.

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

  • Creating JSON documents from java classes using gson
  • setContentView (Activity)
  • setScale (BigDecimal)
  • notifyDataSetChanged (ArrayAdapter)
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Runner (org.openjdk.jmh.runner)
  • Top plugins for Android Studio
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