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

    • Making http post requests using okhttp
    • setRequestProperty (URLConnection)
    • getContentResolver (Context)
    • getApplicationContext (Context)
    • URLConnection (java.net)
      A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
    • Enumeration (java.util)
      A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
    • Random (java.util)
      This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
    • Servlet (javax.servlet)
      Defines methods that all servlets must implement. A servlet is a small Java program that runs within
    • JCheckBox (javax.swing)
    • JList (javax.swing)
    • 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