Tabnine Logo
RelMdDistinctRowCount
Code IndexAdd Tabnine to your IDE (free)

How to use
RelMdDistinctRowCount
in
org.apache.calcite.rel.metadata

Best Java code snippets using org.apache.calcite.rel.metadata.RelMdDistinctRowCount (Showing top 5 results out of 315)

origin: apache/hive

@Override
public Double getDistinctRowCount(RelNode rel, RelMetadataQuery mq, ImmutableBitSet groupKey,
  RexNode predicate) {
 if (rel instanceof HiveTableScan) {
  return getDistinctRowCount((HiveTableScan) rel, mq, groupKey, predicate);
 }
 /*
  * For now use Calcite' default formulas for propagating NDVs up the Query
  * Tree.
  */
 return super.getDistinctRowCount(rel, mq, groupKey, predicate);
}
origin: apache/drill

@Override
public Double getDistinctRowCount(RelNode rel, RelMetadataQuery mq, ImmutableBitSet groupKey,
  RexNode predicate) {
 if (rel instanceof HiveTableScan) {
  return getDistinctRowCount((HiveTableScan) rel, mq, groupKey, predicate);
 }
 /*
  * For now use Calcite' default formulas for propagating NDVs up the Query
  * Tree.
  */
 return super.getDistinctRowCount(rel, mq, groupKey, predicate);
}
origin: com.facebook.presto.hive/hive-apache

@Override
public Double getDistinctRowCount(RelNode rel, ImmutableBitSet groupKey,
  RexNode predicate) {
 if (rel instanceof HiveTableScan) {
  return getDistinctRowCount((HiveTableScan) rel, groupKey, predicate);
 }
 /*
  * For now use Calcite' default formulas for propagating NDVs up the Query
  * Tree.
  */
 return super.getDistinctRowCount(rel, groupKey, predicate);
}
origin: Qihoo360/Quicksql

 public Double getDistinctRowCount(RelSubset rel, RelMetadataQuery mq,
   ImmutableBitSet groupKey, RexNode predicate) {
  final RelNode best = rel.getBest();
  if (best != null) {
   return mq.getDistinctRowCount(best, groupKey, predicate);
  }
  if (!Bug.CALCITE_1048_FIXED) {
   return getDistinctRowCount((RelNode) rel, mq, groupKey, predicate);
  }
  Double d = null;
  for (RelNode r2 : rel.getRels()) {
   try {
    Double d2 = mq.getDistinctRowCount(r2, groupKey, predicate);
    d = NumberUtil.min(d, d2);
   } catch (CyclicMetadataException e) {
    // Ignore this relational expression; there will be non-cyclic ones
    // in this set.
   }
  }
  return d;
 }
}
origin: org.apache.calcite/calcite-core

 public Double getDistinctRowCount(RelSubset rel, RelMetadataQuery mq,
   ImmutableBitSet groupKey, RexNode predicate) {
  final RelNode best = rel.getBest();
  if (best != null) {
   return mq.getDistinctRowCount(best, groupKey, predicate);
  }
  if (!Bug.CALCITE_1048_FIXED) {
   return getDistinctRowCount((RelNode) rel, mq, groupKey, predicate);
  }
  Double d = null;
  for (RelNode r2 : rel.getRels()) {
   try {
    Double d2 = mq.getDistinctRowCount(r2, groupKey, predicate);
    d = NumberUtil.min(d, d2);
   } catch (CyclicMetadataException e) {
    // Ignore this relational expression; there will be non-cyclic ones
    // in this set.
   }
  }
  return d;
 }
}
org.apache.calcite.rel.metadataRelMdDistinctRowCount

Javadoc

RelMdDistinctRowCount supplies a default implementation of RelMetadataQuery#getDistinctRowCount for the standard logical algebra.

Most used methods

  • getDistinctRowCount

Popular in Java

  • Finding current android device location
  • getSystemService (Context)
  • getSharedPreferences (Context)
  • getExternalFilesDir (Context)
  • Kernel (java.awt.image)
  • BufferedWriter (java.io)
    Wraps an existing Writer and buffers the output. Expensive interaction with the underlying reader is
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Path (java.nio.file)
  • ImageIO (javax.imageio)
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now