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

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

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

origin: org.apache.calcite/calcite-core

@Deprecated // to be removed before 2.0
public static double estimateFilteredRows(RelNode child, RexNode condition) {
 final RelMetadataQuery mq = RelMetadataQuery.instance();
 return RelMdUtil.estimateFilteredRows(child, condition, mq);
}
origin: org.apache.calcite/calcite-core

@Deprecated // to be removed before 2.0
public static double estimateFilteredRows(RelNode child, RexProgram program) {
 final RelMetadataQuery mq = RelMetadataQuery.instance();
 return RelMdUtil.estimateFilteredRows(child, program, mq);
}
origin: Qihoo360/Quicksql

@Deprecated // to be removed before 2.0
public static double estimateFilteredRows(RelNode child, RexProgram program) {
 final RelMetadataQuery mq = RelMetadataQuery.instance();
 return RelMdUtil.estimateFilteredRows(child, program, mq);
}
origin: Qihoo360/Quicksql

@Deprecated // to be removed before 2.0
public static double estimateFilteredRows(RelNode child, RexNode condition) {
 final RelMetadataQuery mq = RelMetadataQuery.instance();
 return RelMdUtil.estimateFilteredRows(child, condition, mq);
}
origin: Qihoo360/Quicksql

@Override public double estimateRowCount(RelMetadataQuery mq) {
 return RelMdUtil.estimateFilteredRows(getInput(), condition, mq);
}
origin: org.apache.calcite/calcite-core

@Override public double estimateRowCount(RelMetadataQuery mq) {
 return RelMdUtil.estimateFilteredRows(getInput(), program, mq);
}
origin: org.apache.calcite/calcite-core

@Override public double estimateRowCount(RelMetadataQuery mq) {
 return RelMdUtil.estimateFilteredRows(getInput(), program, mq);
}
origin: Qihoo360/Quicksql

@Override public double estimateRowCount(RelMetadataQuery mq) {
 return RelMdUtil.estimateFilteredRows(getInput(), program, mq);
}
origin: Qihoo360/Quicksql

@Override public double estimateRowCount(RelMetadataQuery mq) {
 return RelMdUtil.estimateFilteredRows(getInput(), program, mq);
}
origin: org.apache.calcite/calcite-core

@Override public double estimateRowCount(RelMetadataQuery mq) {
 return RelMdUtil.estimateFilteredRows(getInput(), condition, mq);
}
origin: Qihoo360/Quicksql

public static double estimateFilteredRows(RelNode child, RexProgram program,
  RelMetadataQuery mq) {
 // convert the program's RexLocalRef condition to an expanded RexNode
 RexLocalRef programCondition = program.getCondition();
 RexNode condition;
 if (programCondition == null) {
  condition = null;
 } else {
  condition = program.expandLocalRef(programCondition);
 }
 return estimateFilteredRows(child, condition, mq);
}
origin: org.apache.calcite/calcite-core

public static double estimateFilteredRows(RelNode child, RexProgram program,
  RelMetadataQuery mq) {
 // convert the program's RexLocalRef condition to an expanded RexNode
 RexLocalRef programCondition = program.getCondition();
 RexNode condition;
 if (programCondition == null) {
  condition = null;
 } else {
  condition = program.expandLocalRef(programCondition);
 }
 return estimateFilteredRows(child, condition, mq);
}
origin: Qihoo360/Quicksql

public Double getRowCount(Filter rel, RelMetadataQuery mq) {
 return RelMdUtil.estimateFilteredRows(rel.getInput(), rel.getCondition(),
   mq);
}
origin: org.apache.calcite/calcite-core

public Double getRowCount(Filter rel, RelMetadataQuery mq) {
 return RelMdUtil.estimateFilteredRows(rel.getInput(), rel.getCondition(),
   mq);
}
origin: Qihoo360/Quicksql

public Double getRowCount(Calc rel, RelMetadataQuery mq) {
 return RelMdUtil.estimateFilteredRows(rel.getInput(), rel.getProgram(), mq);
}
origin: org.apache.calcite/calcite-core

public Double getRowCount(Calc rel, RelMetadataQuery mq) {
 return RelMdUtil.estimateFilteredRows(rel.getInput(), rel.getProgram(), mq);
}
origin: org.apache.drill.exec/drill-java-exec

private double estimateCpuCost(RelMetadataQuery mq) {
 RelNode child = this.getInput();
 double compNum = mq.getRowCount(child);
 for (int i = 0; i< numConjuncts; i++) {
  RexNode conjFilter = RexUtil.composeConjunction(this.getCluster().getRexBuilder(), conjunctions.subList(0, i + 1), false);
  compNum += RelMdUtil.estimateFilteredRows(child, conjFilter, mq);
 }
 return compNum * DrillCostBase.COMPARE_CPU_COST;
}
origin: dremio/dremio-oss

private double estimateCpuCost(RelMetadataQuery relMetadataQuery) {
 RelNode child = this.getInput();
 final double rows = relMetadataQuery.getRowCount(child);
 double compNum = rows;
 double rowCompNum = child.getRowType().getFieldCount() * rows ;
 for (int i = 0; i< numConjuncts; i++) {
  RexNode conjFilter = RexUtil.composeConjunction(this.getCluster().getRexBuilder(), conjunctions.subList(0, i + 1), false);
  compNum += RelMdUtil.estimateFilteredRows(child, conjFilter, relMetadataQuery);
 }
 return compNum * DremioCost.COMPARE_CPU_COST + rowCompNum * DremioCost.COPY_COST;
}
org.apache.calcite.rel.metadataRelMdUtilestimateFilteredRows

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
  • 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.
  • checkInputForCollationAndLimit
    Returns whether a relational expression is already sorted and has fewer rows than the sum of offset
  • cardOfProjExpr,
  • checkInputForCollationAndLimit,
  • computeSemiJoinSelectivity,
  • getJoinPopulationSize,
  • getMinusRowCount,
  • getSelectivityValue,
  • getSemiJoinRowCount,
  • getUnionAllRowCount,
  • makeSemiJoinSelectivityRexNode

Popular in Java

  • Finding current android device location
  • getExternalFilesDir (Context)
  • getApplicationContext (Context)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • CodeWhisperer alternatives
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