| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc --> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <title>RelMdUtil (Apache Calcite calcite API)</title> |
| <link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="RelMdUtil (Apache Calcite calcite API)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":9,"i1":9,"i2":9,"i3":9,"i4":9,"i5":9,"i6":9,"i7":9,"i8":9,"i9":9,"i10":9,"i11":9,"i12":9,"i13":9,"i14":9,"i15":9,"i16":9,"i17":9,"i18":9,"i19":9,"i20":9,"i21":9,"i22":9,"i23":9,"i24":9,"i25":9,"i26":9,"i27":9,"i28":9,"i29":9,"i30":9,"i31":9,"i32":9,"i33":9,"i34":9}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],8:["t4","Concrete Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><b>Apache Calcite</b></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUniqueKeys.html" title="class in org.apache.calcite.rel.metadata"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataProvider.html" title="interface in org.apache.calcite.rel.metadata"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/calcite/rel/metadata/RelMdUtil.html" target="_top">Frames</a></li> |
| <li><a href="RelMdUtil.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_top"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_top"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.top"> |
| <!-- --> |
| </a></div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="subTitle">org.apache.calcite.rel.metadata</div> |
| <h2 title="Class RelMdUtil" class="title">Class RelMdUtil</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>org.apache.calcite.rel.metadata.RelMdUtil</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public class <span class="typeNameLabel">RelMdUtil</span> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></pre> |
| <div class="block">RelMdUtil provides utility methods used by the metadata provider methods.</div> |
| </li> |
| </ul> |
| </div> |
| <div class="summary"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- =========== FIELD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.summary"> |
| <!-- --> |
| </a> |
| <h3>Field Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation"> |
| <caption><span>Fields</span><span class="tabEnd"> </span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Field and Description</th> |
| </tr> |
| <tr class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/calcite/sql/SqlFunction.html" title="class in org.apache.calcite.sql">SqlFunction</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#ARTIFICIAL_SELECTIVITY_FUNC">ARTIFICIAL_SELECTIVITY_FUNC</a></span></code> </td> |
| </tr> |
| </table> |
| </li> |
| </ul> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.summary"> |
| <!-- --> |
| </a> |
| <h3>Method Summary</h3> |
| <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#addEpsilon-double-">addEpsilon</a></span>(double d)</code> |
| <div class="block">Add an epsilon to the value passed in.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#areColumnsDefinitelyUnique-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.util.ImmutableBitSet-">areColumnsDefinitelyUnique</a></span>(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> rel, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a> colMask)</code> |
| <div class="block">Returns true if the columns represented in a bit mask are definitely |
| known to form a unique column set.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#areColumnsDefinitelyUnique-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-java.util.List-">areColumnsDefinitelyUnique</a></span>(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> rel, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../org/apache/calcite/rex/RexInputRef.html" title="class in org.apache.calcite.rex">RexInputRef</a>> columnRefs)</code> </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#areColumnsDefinitelyUniqueWhenNullsFiltered-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.util.ImmutableBitSet-">areColumnsDefinitelyUniqueWhenNullsFiltered</a></span>(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> rel, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a> colMask)</code> |
| <div class="block">Returns true if the columns represented in a bit mask are definitely |
| known to form a unique column set, when nulls have been filtered from |
| the columns.</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#areColumnsDefinitelyUniqueWhenNullsFiltered-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-java.util.List-">areColumnsDefinitelyUniqueWhenNullsFiltered</a></span>(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> rel, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../org/apache/calcite/rex/RexInputRef.html" title="class in org.apache.calcite.rex">RexInputRef</a>> columnRefs)</code> </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#areColumnsUnique-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-java.util.List-">areColumnsUnique</a></span>(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> rel, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../org/apache/calcite/rex/RexInputRef.html" title="class in org.apache.calcite.rex">RexInputRef</a>> columnRefs)</code> </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#areColumnsUniqueWhenNullsFiltered-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-java.util.List-">areColumnsUniqueWhenNullsFiltered</a></span>(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> rel, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../org/apache/calcite/rex/RexInputRef.html" title="class in org.apache.calcite.rex">RexInputRef</a>> columnRefs)</code> </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#capInfinity-java.lang.Double-">capInfinity</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a> d)</code> |
| <div class="block">Caps a double value at Double.MAX_VALUE if it's currently infinity</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#cardOfProjExpr-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.core.Project-org.apache.calcite.rex.RexNode-">cardOfProjExpr</a></span>(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/core/Project.html" title="class in org.apache.calcite.rel.core">Project</a> rel, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr)</code> |
| <div class="block">Computes the cardinality of a particular expression from the projection |
| list.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#checkInputForCollationAndLimit-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelCollation-org.apache.calcite.rex.RexNode-org.apache.calcite.rex.RexNode-">checkInputForCollationAndLimit</a></span>(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> input, |
| <a href="../../../../../org/apache/calcite/rel/RelCollation.html" title="interface in org.apache.calcite.rel">RelCollation</a> collation, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> offset, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> fetch)</code> |
| <div class="block">Returns whether a relational expression is already sorted and has fewer |
| rows than the sum of offset and limit.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#clearCache-org.apache.calcite.rel.RelNode-">clearCache</a></span>(<a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> rel)</code> |
| <div class="block">Removes cached metadata values for specified RelNode.</div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#computeSemiJoinSelectivity-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.core.Join-">computeSemiJoinSelectivity</a></span>(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> factRel, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> dimRel, |
| <a href="../../../../../org/apache/calcite/rel/core/Join.html" title="class in org.apache.calcite.rel.core">Join</a> rel)</code> |
| <div class="block">Computes the selectivity of a semijoin filter if it is applied on a fact |
| table.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#computeSemiJoinSelectivity-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-java.util.List-java.util.List-">computeSemiJoinSelectivity</a></span>(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> factRel, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> dimRel, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>> factKeyList, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>> dimKeyList)</code> |
| <div class="block">Computes the selectivity of a semijoin filter if it is applied on a fact |
| table.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#estimateFilteredRows-org.apache.calcite.rel.RelNode-org.apache.calcite.rex.RexNode-org.apache.calcite.rel.metadata.RelMetadataQuery-">estimateFilteredRows</a></span>(<a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> child, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition, |
| <a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq)</code> </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#estimateFilteredRows-org.apache.calcite.rel.RelNode-org.apache.calcite.rex.RexProgram-org.apache.calcite.rel.metadata.RelMetadataQuery-">estimateFilteredRows</a></span>(<a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> child, |
| <a href="../../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a> program, |
| <a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq)</code> </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#getJoinDistinctRowCount-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.core.JoinRelType-org.apache.calcite.util.ImmutableBitSet-org.apache.calcite.rex.RexNode-boolean-">getJoinDistinctRowCount</a></span>(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> joinRel, |
| <a href="../../../../../org/apache/calcite/rel/core/JoinRelType.html" title="enum in org.apache.calcite.rel.core">JoinRelType</a> joinType, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a> groupKey, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> predicate, |
| boolean useMaxNdv)</code> |
| <div class="block">Computes the number of distinct rows for a set of keys returned from a |
| join.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#getJoinPopulationSize-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.util.ImmutableBitSet-">getJoinPopulationSize</a></span>(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> joinRel, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a> groupKey)</code> |
| <div class="block">Computes the population size for a set of keys returned from a join</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#getJoinRowCount-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.core.Join-org.apache.calcite.rex.RexNode-">getJoinRowCount</a></span>(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/core/Join.html" title="class in org.apache.calcite.rel.core">Join</a> join, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition)</code> |
| <div class="block">Returns an estimate of the number of rows returned by a <a href="../../../../../org/apache/calcite/rel/core/Join.html" title="class in org.apache.calcite.rel.core"><code>Join</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#getMinusRowCount-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.core.Minus-">getMinusRowCount</a></span>(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/core/Minus.html" title="class in org.apache.calcite.rel.core">Minus</a> minus)</code> |
| <div class="block">Returns an estimate of the number of rows returned by a <a href="../../../../../org/apache/calcite/rel/core/Minus.html" title="class in org.apache.calcite.rel.core"><code>Minus</code></a>.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#getSelectivityValue-org.apache.calcite.rex.RexNode-">getSelectivityValue</a></span>(<a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> artificialSelectivityFuncNode)</code> |
| <div class="block">Returns the selectivity value stored in a call.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#getSemiJoinDistinctRowCount-org.apache.calcite.rel.core.Join-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.util.ImmutableBitSet-org.apache.calcite.rex.RexNode-">getSemiJoinDistinctRowCount</a></span>(<a href="../../../../../org/apache/calcite/rel/core/Join.html" title="class in org.apache.calcite.rel.core">Join</a> semiJoinRel, |
| <a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a> groupKey, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> predicate)</code> |
| <div class="block">Computes the number of distinct rows for a set of keys returned from a |
| semi-join</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#getSemiJoinRowCount-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.core.JoinRelType-org.apache.calcite.rex.RexNode-">getSemiJoinRowCount</a></span>(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> left, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> right, |
| <a href="../../../../../org/apache/calcite/rel/core/JoinRelType.html" title="enum in org.apache.calcite.rel.core">JoinRelType</a> joinType, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition)</code> |
| <div class="block">Returns an estimate of the number of rows returned by a semi-join.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#getUnionAllRowCount-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.core.Union-">getUnionAllRowCount</a></span>(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/core/Union.html" title="class in org.apache.calcite.rel.core">Union</a> rel)</code> |
| <div class="block">Returns an estimate of the number of rows returned by a <a href="../../../../../org/apache/calcite/rel/core/Union.html" title="class in org.apache.calcite.rel.core"><code>Union</code></a> |
| (before duplicates are eliminated).</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#guessSelectivity-org.apache.calcite.rex.RexNode-">guessSelectivity</a></span>(<a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> predicate)</code> |
| <div class="block">Returns default estimates for selectivities, in the absence of stats.</div> |
| </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#guessSelectivity-org.apache.calcite.rex.RexNode-boolean-">guessSelectivity</a></span>(<a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> predicate, |
| boolean artificialOnly)</code> |
| <div class="block">Returns default estimates for selectivities, in the absence of stats.</div> |
| </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code>static double</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#linear-int-int-int-double-double-">linear</a></span>(int x, |
| int minX, |
| int maxX, |
| double minY, |
| double maxY)</code> |
| <div class="block">Returns a point on a line.</div> |
| </td> |
| </tr> |
| <tr id="i26" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#makeSemiJoinSelectivityRexNode-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.core.Join-">makeSemiJoinSelectivityRexNode</a></span>(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/core/Join.html" title="class in org.apache.calcite.rel.core">Join</a> rel)</code> |
| <div class="block">Creates a RexNode that stores a selectivity value corresponding to the |
| selectivity of a semijoin.</div> |
| </td> |
| </tr> |
| <tr id="i27" class="rowColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#minusPreds-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexNode-org.apache.calcite.rex.RexNode-">minusPreds</a></span>(<a href="../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> pred1, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> pred2)</code> |
| <div class="block">Takes the difference between two predicates, removing from the first any |
| predicates also in the second</div> |
| </td> |
| </tr> |
| <tr id="i28" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#numDistinctVals-java.lang.Double-java.lang.Double-">numDistinctVals</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a> domainSize, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a> numSelected)</code> |
| <div class="block">Returns the number of distinct values provided numSelected are selected |
| where there are domainSize distinct values.</div> |
| </td> |
| </tr> |
| <tr id="i29" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#setAggChildKeys-org.apache.calcite.util.ImmutableBitSet-org.apache.calcite.rel.core.Aggregate-org.apache.calcite.util.ImmutableBitSet.Builder-">setAggChildKeys</a></span>(<a href="../../../../../org/apache/calcite/util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a> groupKey, |
| <a href="../../../../../org/apache/calcite/rel/core/Aggregate.html" title="class in org.apache.calcite.rel.core">Aggregate</a> aggRel, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.Builder.html" title="class in org.apache.calcite.util">ImmutableBitSet.Builder</a> childKey)</code> |
| <div class="block">Takes a bitmap representing a set of input references and extracts the |
| ones that reference the group by columns in an aggregate.</div> |
| </td> |
| </tr> |
| <tr id="i30" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#setLeftRightBitmaps-org.apache.calcite.util.ImmutableBitSet-org.apache.calcite.util.ImmutableBitSet.Builder-org.apache.calcite.util.ImmutableBitSet.Builder-int-">setLeftRightBitmaps</a></span>(<a href="../../../../../org/apache/calcite/util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a> groupKey, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.Builder.html" title="class in org.apache.calcite.util">ImmutableBitSet.Builder</a> leftMask, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.Builder.html" title="class in org.apache.calcite.util">ImmutableBitSet.Builder</a> rightMask, |
| int nFieldsOnLeft)</code> |
| <div class="block">Separates a bit-mask representing a join into masks representing the left |
| and right inputs into the join.</div> |
| </td> |
| </tr> |
| <tr id="i31" class="rowColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#splitCols-java.util.List-org.apache.calcite.util.ImmutableBitSet-org.apache.calcite.util.ImmutableBitSet.Builder-org.apache.calcite.util.ImmutableBitSet.Builder-">splitCols</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> projExprs, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a> groupKey, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.Builder.html" title="class in org.apache.calcite.util">ImmutableBitSet.Builder</a> baseCols, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.Builder.html" title="class in org.apache.calcite.util">ImmutableBitSet.Builder</a> projCols)</code> |
| <div class="block">Forms two bitmaps by splitting the columns in a bitmap according to |
| whether or not the column references the child input or is an expression</div> |
| </td> |
| </tr> |
| <tr id="i32" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#unionPreds-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexNode-org.apache.calcite.rex.RexNode-">unionPreds</a></span>(<a href="../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> pred1, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> pred2)</code> |
| <div class="block">AND's two predicates together, either of which may be null, removing |
| redundant filters.</div> |
| </td> |
| </tr> |
| <tr id="i33" class="rowColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#validatePercentage-java.lang.Double-">validatePercentage</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a> result)</code> |
| <div class="block">Validate the <code>result</code> represents a percentage number, |
| e.g.</div> |
| </td> |
| </tr> |
| <tr id="i34" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUtil.html#validateResult-java.lang.Double-">validateResult</a></span>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a> result)</code> |
| <div class="block">Validates the <code>result</code> is valid.</div> |
| </td> |
| </tr> |
| </table> |
| <ul class="blockList"> |
| <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> |
| <!-- --> |
| </a> |
| <h3>Methods inherited from class java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| <div class="details"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <!-- ============ FIELD DETAIL =========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="field.detail"> |
| <!-- --> |
| </a> |
| <h3>Field Detail</h3> |
| <a name="ARTIFICIAL_SELECTIVITY_FUNC"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>ARTIFICIAL_SELECTIVITY_FUNC</h4> |
| <pre>public static final <a href="../../../../../org/apache/calcite/sql/SqlFunction.html" title="class in org.apache.calcite.sql">SqlFunction</a> ARTIFICIAL_SELECTIVITY_FUNC</pre> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| <!-- ============ METHOD DETAIL ========== --> |
| <ul class="blockList"> |
| <li class="blockList"><a name="method.detail"> |
| <!-- --> |
| </a> |
| <h3>Method Detail</h3> |
| <a name="makeSemiJoinSelectivityRexNode-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.core.Join-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>makeSemiJoinSelectivityRexNode</h4> |
| <pre>public static <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> makeSemiJoinSelectivityRexNode(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/core/Join.html" title="class in org.apache.calcite.rel.core">Join</a> rel)</pre> |
| <div class="block">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.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rel</code> - the semijoin of interest</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>constructed rexnode</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getSelectivityValue-org.apache.calcite.rex.RexNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSelectivityValue</h4> |
| <pre>public static double getSelectivityValue(<a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> artificialSelectivityFuncNode)</pre> |
| <div class="block">Returns the selectivity value stored in a call.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>artificialSelectivityFuncNode</code> - Call containing the selectivity value</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>selectivity value</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="computeSemiJoinSelectivity-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.core.Join-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>computeSemiJoinSelectivity</h4> |
| <pre>public static double computeSemiJoinSelectivity(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> factRel, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> dimRel, |
| <a href="../../../../../org/apache/calcite/rel/core/Join.html" title="class in org.apache.calcite.rel.core">Join</a> rel)</pre> |
| <div class="block">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.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>factRel</code> - fact table participating in the semijoin</dd> |
| <dd><code>dimRel</code> - dimension table participating in the semijoin</dd> |
| <dd><code>rel</code> - semijoin rel</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>calculated selectivity</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="computeSemiJoinSelectivity-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-java.util.List-java.util.List-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>computeSemiJoinSelectivity</h4> |
| <pre>public static double computeSemiJoinSelectivity(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> factRel, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> dimRel, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>> factKeyList, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Integer.html?is-external=true" title="class or interface in java.lang">Integer</a>> dimKeyList)</pre> |
| <div class="block">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.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>factRel</code> - fact table participating in the semijoin</dd> |
| <dd><code>dimRel</code> - dimension table participating in the semijoin</dd> |
| <dd><code>factKeyList</code> - LHS keys used in the filter</dd> |
| <dd><code>dimKeyList</code> - RHS keys used in the filter</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>calculated selectivity</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="areColumnsDefinitelyUnique-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.util.ImmutableBitSet-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>areColumnsDefinitelyUnique</h4> |
| <pre>public static boolean areColumnsDefinitelyUnique(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> rel, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a> colMask)</pre> |
| <div class="block">Returns true if the columns represented in a bit mask are definitely |
| known to form a unique column set.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rel</code> - the relational expression that the column mask corresponds |
| to</dd> |
| <dd><code>colMask</code> - bit mask containing columns that will be tested for |
| uniqueness</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if bit mask represents a unique column set; false if not (or |
| if no metadata is available)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="areColumnsUnique-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-java.util.List-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>areColumnsUnique</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a> areColumnsUnique(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> rel, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../org/apache/calcite/rex/RexInputRef.html" title="class in org.apache.calcite.rex">RexInputRef</a>> columnRefs)</pre> |
| </li> |
| </ul> |
| <a name="areColumnsDefinitelyUnique-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-java.util.List-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>areColumnsDefinitelyUnique</h4> |
| <pre>public static boolean areColumnsDefinitelyUnique(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> rel, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../org/apache/calcite/rex/RexInputRef.html" title="class in org.apache.calcite.rex">RexInputRef</a>> columnRefs)</pre> |
| </li> |
| </ul> |
| <a name="areColumnsDefinitelyUniqueWhenNullsFiltered-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.util.ImmutableBitSet-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>areColumnsDefinitelyUniqueWhenNullsFiltered</h4> |
| <pre>public static boolean areColumnsDefinitelyUniqueWhenNullsFiltered(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> rel, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a> colMask)</pre> |
| <div class="block">Returns true if the columns represented in a bit mask are definitely |
| known to form a unique column set, when nulls have been filtered from |
| the columns.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rel</code> - the relational expression that the column mask corresponds |
| to</dd> |
| <dd><code>colMask</code> - bit mask containing columns that will be tested for |
| uniqueness</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if bit mask represents a unique column set; false if not (or |
| if no metadata is available)</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="areColumnsUniqueWhenNullsFiltered-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-java.util.List-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>areColumnsUniqueWhenNullsFiltered</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Boolean.html?is-external=true" title="class or interface in java.lang">Boolean</a> areColumnsUniqueWhenNullsFiltered(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> rel, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../org/apache/calcite/rex/RexInputRef.html" title="class in org.apache.calcite.rex">RexInputRef</a>> columnRefs)</pre> |
| </li> |
| </ul> |
| <a name="areColumnsDefinitelyUniqueWhenNullsFiltered-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-java.util.List-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>areColumnsDefinitelyUniqueWhenNullsFiltered</h4> |
| <pre>public static boolean areColumnsDefinitelyUniqueWhenNullsFiltered(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> rel, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../org/apache/calcite/rex/RexInputRef.html" title="class in org.apache.calcite.rex">RexInputRef</a>> columnRefs)</pre> |
| </li> |
| </ul> |
| <a name="setLeftRightBitmaps-org.apache.calcite.util.ImmutableBitSet-org.apache.calcite.util.ImmutableBitSet.Builder-org.apache.calcite.util.ImmutableBitSet.Builder-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setLeftRightBitmaps</h4> |
| <pre>public static void setLeftRightBitmaps(<a href="../../../../../org/apache/calcite/util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a> groupKey, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.Builder.html" title="class in org.apache.calcite.util">ImmutableBitSet.Builder</a> leftMask, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.Builder.html" title="class in org.apache.calcite.util">ImmutableBitSet.Builder</a> rightMask, |
| int nFieldsOnLeft)</pre> |
| <div class="block">Separates a bit-mask representing a join into masks representing the left |
| and right inputs into the join.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>groupKey</code> - original bit-mask</dd> |
| <dd><code>leftMask</code> - left bit-mask to be set</dd> |
| <dd><code>rightMask</code> - right bit-mask to be set</dd> |
| <dd><code>nFieldsOnLeft</code> - number of fields in the left input</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="numDistinctVals-java.lang.Double-java.lang.Double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>numDistinctVals</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a> numDistinctVals(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a> domainSize, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a> numSelected)</pre> |
| <div class="block">Returns the number of distinct values provided numSelected are selected |
| where there are domainSize distinct values. |
| |
| <p>Note that in the case where domainSize == numSelected, it's not true |
| that the return value should be domainSize. If you pick 100 random values |
| between 1 and 100, you'll most likely end up with fewer than 100 distinct |
| values, because you'll pick some values more than once.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>domainSize</code> - number of distinct values in the domain</dd> |
| <dd><code>numSelected</code> - number selected from the domain</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>number of distinct values for subset selected</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="capInfinity-java.lang.Double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>capInfinity</h4> |
| <pre>public static double capInfinity(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a> d)</pre> |
| <div class="block">Caps a double value at Double.MAX_VALUE if it's currently infinity</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>d</code> - the Double object</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the double value if it's not infinity; else Double.MAX_VALUE</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="guessSelectivity-org.apache.calcite.rex.RexNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>guessSelectivity</h4> |
| <pre>public static double guessSelectivity(<a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> predicate)</pre> |
| <div class="block">Returns default estimates for selectivities, in the absence of stats.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>predicate</code> - predicate for which selectivity will be computed; null |
| means true, so gives selectity of 1.0</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>estimated selectivity</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="guessSelectivity-org.apache.calcite.rex.RexNode-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>guessSelectivity</h4> |
| <pre>public static double guessSelectivity(<a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> predicate, |
| boolean artificialOnly)</pre> |
| <div class="block">Returns default estimates for selectivities, in the absence of stats.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>predicate</code> - predicate for which selectivity will be computed; |
| null means true, so gives selectity of 1.0</dd> |
| <dd><code>artificialOnly</code> - return only the selectivity contribution from |
| artificial nodes</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>estimated selectivity</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="unionPreds-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexNode-org.apache.calcite.rex.RexNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>unionPreds</h4> |
| <pre>public static <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> unionPreds(<a href="../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> pred1, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> pred2)</pre> |
| <div class="block">AND's two predicates together, either of which may be null, removing |
| redundant filters.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rexBuilder</code> - rexBuilder used to construct AND'd RexNode</dd> |
| <dd><code>pred1</code> - first predicate</dd> |
| <dd><code>pred2</code> - second predicate</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>AND'd predicate or individual predicates if one is null</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="minusPreds-org.apache.calcite.rex.RexBuilder-org.apache.calcite.rex.RexNode-org.apache.calcite.rex.RexNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>minusPreds</h4> |
| <pre>public static <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> minusPreds(<a href="../../../../../org/apache/calcite/rex/RexBuilder.html" title="class in org.apache.calcite.rex">RexBuilder</a> rexBuilder, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> pred1, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> pred2)</pre> |
| <div class="block">Takes the difference between two predicates, removing from the first any |
| predicates also in the second</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rexBuilder</code> - rexBuilder used to construct AND'd RexNode</dd> |
| <dd><code>pred1</code> - first predicate</dd> |
| <dd><code>pred2</code> - second predicate</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>MINUS'd predicate list</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setAggChildKeys-org.apache.calcite.util.ImmutableBitSet-org.apache.calcite.rel.core.Aggregate-org.apache.calcite.util.ImmutableBitSet.Builder-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setAggChildKeys</h4> |
| <pre>public static void setAggChildKeys(<a href="../../../../../org/apache/calcite/util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a> groupKey, |
| <a href="../../../../../org/apache/calcite/rel/core/Aggregate.html" title="class in org.apache.calcite.rel.core">Aggregate</a> aggRel, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.Builder.html" title="class in org.apache.calcite.util">ImmutableBitSet.Builder</a> childKey)</pre> |
| <div class="block">Takes a bitmap representing a set of input references and extracts the |
| ones that reference the group by columns in an aggregate.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>groupKey</code> - the original bitmap</dd> |
| <dd><code>aggRel</code> - the aggregate</dd> |
| <dd><code>childKey</code> - sets bits from groupKey corresponding to group by columns</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="splitCols-java.util.List-org.apache.calcite.util.ImmutableBitSet-org.apache.calcite.util.ImmutableBitSet.Builder-org.apache.calcite.util.ImmutableBitSet.Builder-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>splitCols</h4> |
| <pre>public static void splitCols(<a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a>> projExprs, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a> groupKey, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.Builder.html" title="class in org.apache.calcite.util">ImmutableBitSet.Builder</a> baseCols, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.Builder.html" title="class in org.apache.calcite.util">ImmutableBitSet.Builder</a> projCols)</pre> |
| <div class="block">Forms two bitmaps by splitting the columns in a bitmap according to |
| whether or not the column references the child input or is an expression</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>projExprs</code> - Project expressions</dd> |
| <dd><code>groupKey</code> - Bitmap whose columns will be split</dd> |
| <dd><code>baseCols</code> - Bitmap representing columns from the child input</dd> |
| <dd><code>projCols</code> - Bitmap representing non-child columns</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="cardOfProjExpr-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.core.Project-org.apache.calcite.rex.RexNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>cardOfProjExpr</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a> cardOfProjExpr(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/core/Project.html" title="class in org.apache.calcite.rel.core">Project</a> rel, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> expr)</pre> |
| <div class="block">Computes the cardinality of a particular expression from the projection |
| list.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rel</code> - RelNode corresponding to the project</dd> |
| <dd><code>expr</code> - projection expression</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>cardinality</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getJoinPopulationSize-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.util.ImmutableBitSet-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getJoinPopulationSize</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a> getJoinPopulationSize(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> joinRel, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a> groupKey)</pre> |
| <div class="block">Computes the population size for a set of keys returned from a join</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>joinRel</code> - the join rel</dd> |
| <dd><code>groupKey</code> - keys to compute the population for</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>computed population size</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="addEpsilon-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>addEpsilon</h4> |
| <pre>public static double addEpsilon(double d)</pre> |
| <div class="block">Add an epsilon to the value passed in.</div> |
| </li> |
| </ul> |
| <a name="getSemiJoinDistinctRowCount-org.apache.calcite.rel.core.Join-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.util.ImmutableBitSet-org.apache.calcite.rex.RexNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSemiJoinDistinctRowCount</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a> getSemiJoinDistinctRowCount(<a href="../../../../../org/apache/calcite/rel/core/Join.html" title="class in org.apache.calcite.rel.core">Join</a> semiJoinRel, |
| <a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a> groupKey, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> predicate)</pre> |
| <div class="block">Computes the number of distinct rows for a set of keys returned from a |
| semi-join</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>semiJoinRel</code> - RelNode representing the semi-join</dd> |
| <dd><code>mq</code> - metadata query</dd> |
| <dd><code>groupKey</code> - keys that the distinct row count will be computed for</dd> |
| <dd><code>predicate</code> - join predicate</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>number of distinct rows</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getJoinDistinctRowCount-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.core.JoinRelType-org.apache.calcite.util.ImmutableBitSet-org.apache.calcite.rex.RexNode-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getJoinDistinctRowCount</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a> getJoinDistinctRowCount(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> joinRel, |
| <a href="../../../../../org/apache/calcite/rel/core/JoinRelType.html" title="enum in org.apache.calcite.rel.core">JoinRelType</a> joinType, |
| <a href="../../../../../org/apache/calcite/util/ImmutableBitSet.html" title="class in org.apache.calcite.util">ImmutableBitSet</a> groupKey, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> predicate, |
| boolean useMaxNdv)</pre> |
| <div class="block">Computes the number of distinct rows for a set of keys returned from a |
| join. Also known as NDV (number of distinct values).</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>joinRel</code> - RelNode representing the join</dd> |
| <dd><code>joinType</code> - type of join</dd> |
| <dd><code>groupKey</code> - keys that the distinct row count will be computed for</dd> |
| <dd><code>predicate</code> - join predicate</dd> |
| <dd><code>useMaxNdv</code> - If true use formula <code>max(left NDV, right NDV)</code>, |
| otherwise use <code>left NDV * right NDV</code>.</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>number of distinct rows</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getUnionAllRowCount-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.core.Union-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getUnionAllRowCount</h4> |
| <pre>public static double getUnionAllRowCount(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/core/Union.html" title="class in org.apache.calcite.rel.core">Union</a> rel)</pre> |
| <div class="block">Returns an estimate of the number of rows returned by a <a href="../../../../../org/apache/calcite/rel/core/Union.html" title="class in org.apache.calcite.rel.core"><code>Union</code></a> |
| (before duplicates are eliminated).</div> |
| </li> |
| </ul> |
| <a name="getMinusRowCount-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.core.Minus-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getMinusRowCount</h4> |
| <pre>public static double getMinusRowCount(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/core/Minus.html" title="class in org.apache.calcite.rel.core">Minus</a> minus)</pre> |
| <div class="block">Returns an estimate of the number of rows returned by a <a href="../../../../../org/apache/calcite/rel/core/Minus.html" title="class in org.apache.calcite.rel.core"><code>Minus</code></a>.</div> |
| </li> |
| </ul> |
| <a name="getJoinRowCount-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.core.Join-org.apache.calcite.rex.RexNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getJoinRowCount</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a> getJoinRowCount(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/core/Join.html" title="class in org.apache.calcite.rel.core">Join</a> join, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition)</pre> |
| <div class="block">Returns an estimate of the number of rows returned by a <a href="../../../../../org/apache/calcite/rel/core/Join.html" title="class in org.apache.calcite.rel.core"><code>Join</code></a>.</div> |
| </li> |
| </ul> |
| <a name="getSemiJoinRowCount-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.core.JoinRelType-org.apache.calcite.rex.RexNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getSemiJoinRowCount</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a> getSemiJoinRowCount(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> left, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> right, |
| <a href="../../../../../org/apache/calcite/rel/core/JoinRelType.html" title="enum in org.apache.calcite.rel.core">JoinRelType</a> joinType, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition)</pre> |
| <div class="block">Returns an estimate of the number of rows returned by a semi-join.</div> |
| </li> |
| </ul> |
| <a name="estimateFilteredRows-org.apache.calcite.rel.RelNode-org.apache.calcite.rex.RexProgram-org.apache.calcite.rel.metadata.RelMetadataQuery-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>estimateFilteredRows</h4> |
| <pre>public static double estimateFilteredRows(<a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> child, |
| <a href="../../../../../org/apache/calcite/rex/RexProgram.html" title="class in org.apache.calcite.rex">RexProgram</a> program, |
| <a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq)</pre> |
| </li> |
| </ul> |
| <a name="estimateFilteredRows-org.apache.calcite.rel.RelNode-org.apache.calcite.rex.RexNode-org.apache.calcite.rel.metadata.RelMetadataQuery-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>estimateFilteredRows</h4> |
| <pre>public static double estimateFilteredRows(<a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> child, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> condition, |
| <a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq)</pre> |
| </li> |
| </ul> |
| <a name="linear-int-int-int-double-double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>linear</h4> |
| <pre>public static double linear(int x, |
| int minX, |
| int maxX, |
| double minY, |
| double maxY)</pre> |
| <div class="block">Returns a point on a line. |
| |
| <p>The result is always a value between <code>minY</code> and <code>maxY</code>, |
| even if <code>x</code> is not between <code>minX</code> and <code>maxX</code>. |
| |
| <p>Examples:<ul> |
| <li><code>linear(0, 0, 10, 100, 200</code>} returns 100 because 0 is minX |
| <li><code>linear(5, 0, 10, 100, 200</code>} returns 150 because 5 is |
| mid-way between minX and maxX |
| <li><code>linear(5, 0, 10, 100, 200</code>} returns 160 |
| <li><code>linear(10, 0, 10, 100, 200</code>} returns 200 because 10 is maxX |
| <li><code>linear(-2, 0, 10, 100, 200</code>} returns 100 because -2 is |
| less than minX and is therefore treated as minX |
| <li><code>linear(12, 0, 10, 100, 200</code>} returns 100 because 12 is |
| greater than maxX and is therefore treated as maxX |
| </ul></div> |
| </li> |
| </ul> |
| <a name="checkInputForCollationAndLimit-org.apache.calcite.rel.metadata.RelMetadataQuery-org.apache.calcite.rel.RelNode-org.apache.calcite.rel.RelCollation-org.apache.calcite.rex.RexNode-org.apache.calcite.rex.RexNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>checkInputForCollationAndLimit</h4> |
| <pre>public static boolean checkInputForCollationAndLimit(<a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataQuery.html" title="class in org.apache.calcite.rel.metadata">RelMetadataQuery</a> mq, |
| <a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> input, |
| <a href="../../../../../org/apache/calcite/rel/RelCollation.html" title="interface in org.apache.calcite.rel">RelCollation</a> collation, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> offset, |
| <a href="../../../../../org/apache/calcite/rex/RexNode.html" title="class in org.apache.calcite.rex">RexNode</a> fetch)</pre> |
| <div class="block">Returns whether a relational expression is already sorted and has fewer |
| rows than the sum of offset and limit. |
| |
| <p>If this is the case, it is safe to push down a |
| <a href="../../../../../org/apache/calcite/rel/core/Sort.html" title="class in org.apache.calcite.rel.core"><code>Sort</code></a> with limit and optional offset.</div> |
| </li> |
| </ul> |
| <a name="validatePercentage-java.lang.Double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>validatePercentage</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a> validatePercentage(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a> result)</pre> |
| <div class="block">Validate the <code>result</code> represents a percentage number, |
| e.g. the value interval is [0.0, 1.0].</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if the <code>result</code> is a percentage number</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AssertionError.html?is-external=true" title="class or interface in java.lang">AssertionError</a></code> - if the validation fails</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="validateResult-java.lang.Double-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>validateResult</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a> validateResult(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Double.html?is-external=true" title="class or interface in java.lang">Double</a> result)</pre> |
| <div class="block">Validates the <code>result</code> is valid. |
| |
| <p>Never let the result go below 1, as it will result in incorrect |
| calculations if the row-count is used as the denominator in a |
| division expression. Also, cap the value at the max double value |
| to avoid calculations using infinity.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>the corrected value from the <code>result</code></dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/AssertionError.html?is-external=true" title="class or interface in java.lang">AssertionError</a></code> - if the <code>result</code> is negative</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="clearCache-org.apache.calcite.rel.RelNode-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>clearCache</h4> |
| <pre>public static boolean clearCache(<a href="../../../../../org/apache/calcite/rel/RelNode.html" title="interface in org.apache.calcite.rel">RelNode</a> rel)</pre> |
| <div class="block">Removes cached metadata values for specified RelNode.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>rel</code> - RelNode whose cached metadata should be removed</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>true if cache for the provided RelNode was not empty</dd> |
| </dl> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </li> |
| </ul> |
| </div> |
| </div> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <div class="bottomNav"><a name="navbar.bottom"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../../../overview-summary.html">Overview</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="package-tree.html">Tree</a></li> |
| <li><a href="../../../../../deprecated-list.html">Deprecated</a></li> |
| <li><a href="../../../../../index-all.html">Index</a></li> |
| <li><a href="../../../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><b>Apache Calcite</b></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../../../org/apache/calcite/rel/metadata/RelMdUniqueKeys.html" title="class in org.apache.calcite.rel.metadata"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../../../org/apache/calcite/rel/metadata/RelMetadataProvider.html" title="interface in org.apache.calcite.rel.metadata"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../../../index.html?org/apache/calcite/rel/metadata/RelMdUtil.html" target="_top">Frames</a></li> |
| <li><a href="RelMdUtil.html" target="_top">No Frames</a></li> |
| </ul> |
| <ul class="navList" id="allclasses_navbar_bottom"> |
| <li><a href="../../../../../allclasses-noframe.html">All Classes</a></li> |
| </ul> |
| <div> |
| <script type="text/javascript"><!-- |
| allClassesLink = document.getElementById("allclasses_navbar_bottom"); |
| if(window==top) { |
| allClassesLink.style.display = "block"; |
| } |
| else { |
| allClassesLink.style.display = "none"; |
| } |
| //--> |
| </script> |
| </div> |
| <div> |
| <ul class="subNavList"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li><a href="#field.summary">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="subNavList"> |
| <li>Detail: </li> |
| <li><a href="#field.detail">Field</a> | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <a name="skip.navbar.bottom"> |
| <!-- --> |
| </a></div> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| <p class="legalCopy"><small>Copyright © 2012-2020 Apache Software Foundation. All Rights Reserved.</small></p> |
| </body> |
| </html> |