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

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

Best Java code snippets using org.apache.calcite.rel.metadata.RelMdDistinctRowCount.getDistinctRowCount (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.metadataRelMdDistinctRowCountgetDistinctRowCount

Javadoc

Catch-all implementation for BuiltInMetadata.DistinctRowCount#getDistinctRowCount(ImmutableBitSet,RexNode), invoked using reflection.

Popular methods of RelMdDistinctRowCount

    Popular in Java

    • Parsing JSON documents to java classes using gson
    • getResourceAsStream (ClassLoader)
    • getSharedPreferences (Context)
    • getApplicationContext (Context)
    • FlowLayout (java.awt)
      A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
    • BufferedImage (java.awt.image)
      The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
    • Kernel (java.awt.image)
    • Queue (java.util)
      A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
    • CountDownLatch (java.util.concurrent)
      A synchronization aid that allows one or more threads to wait until a set of operations being perfor
    • Executor (java.util.concurrent)
      An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
    • Top Vim 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