congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
RelOptUtil$InputReferencedVisitor.<init>
Code IndexAdd Tabnine to your IDE (free)

How to use
org.apache.calcite.plan.RelOptUtil$InputReferencedVisitor
constructor

Best Java code snippets using org.apache.calcite.plan.RelOptUtil$InputReferencedVisitor.<init> (Showing top 11 results out of 315)

origin: apache/hive

for (int i=0; i<inputs.size(); i++) {
 ImmutableSet.Builder<Integer> projsFromInputJoinKeysInChildSchema = ImmutableSet.builder();
 InputReferencedVisitor irvLeft = new InputReferencedVisitor();
 irvLeft.apply(joinExprs.get(i));
 projsFromInputJoinKeysInChildSchema.addAll(irvLeft.inputPosReferenced);
origin: apache/drill

for (int i=0; i<inputs.size(); i++) {
 ImmutableSet.Builder<Integer> projsFromInputJoinKeysInChildSchema = ImmutableSet.builder();
 InputReferencedVisitor irvLeft = new InputReferencedVisitor();
 irvLeft.apply(joinExprs.get(i));
 projsFromInputJoinKeysInChildSchema.addAll(irvLeft.inputPosReferenced);
origin: Qihoo360/Quicksql

final RelOptUtil.InputReferencedVisitor visitor = new RelOptUtil.InputReferencedVisitor();
conj.accept(visitor);
if (visitor.inputPosReferenced.contains(timestampFieldIdx)) {
origin: Qihoo360/Quicksql

  cluster.getTypeFactory().builder();
final RelOptUtil.InputReferencedVisitor visitor =
  new RelOptUtil.InputReferencedVisitor();
final List<Integer> positions = new ArrayList<>();
final List<RelDataType> innerTypes = new ArrayList<>();
origin: com.facebook.presto.hive/hive-apache

for (int i=0; i<inputs.size(); i++) {
 ImmutableSet.Builder<Integer> projsFromInputJoinKeysInChildSchema = ImmutableSet.builder();
 InputReferencedVisitor irvLeft = new InputReferencedVisitor();
 irvLeft.apply(joinKeyExprs.get(i));
 projsFromInputJoinKeysInChildSchema.addAll(irvLeft.inputPosReferenced);
origin: org.apache.calcite/calcite-druid

private static Pair<List<RexNode>, List<RexNode>> splitProjects(final RexBuilder rexBuilder,
    final RelNode input, List<RexNode> nodes) {
 final RelOptUtil.InputReferencedVisitor visitor = new RelOptUtil.InputReferencedVisitor();
 for (RexNode node : nodes) {
  node.accept(visitor);
origin: Qihoo360/Quicksql

private static Pair<List<RexNode>, List<RexNode>> splitProjects(final RexBuilder rexBuilder,
                                final RelNode input, List<RexNode> nodes) {
 final RelOptUtil.InputReferencedVisitor visitor = new RelOptUtil.InputReferencedVisitor();
 for (RexNode node : nodes) {
  node.accept(visitor);
origin: org.apache.calcite/calcite-druid

 /**
  * Given a list of conditions that contain Druid valid operations and
  * a list that contains those that contain any non-supported operation,
  * it outputs a triple with three different categories:
  * 1-l) condition filters on the timestamp column,
  * 2-m) condition filters that can be pushed to Druid,
  * 3-r) condition filters that cannot be pushed to Druid.
  */
 private static Triple<List<RexNode>, List<RexNode>, List<RexNode>> splitFilters(
   final RexBuilder rexBuilder, final DruidQuery input, final List<RexNode> validPreds,
   final List<RexNode> nonValidPreds, final int timestampFieldIdx) {
  final List<RexNode> timeRangeNodes = new ArrayList<>();
  final List<RexNode> pushableNodes = new ArrayList<>();
  final List<RexNode> nonPushableNodes = new ArrayList<>(nonValidPreds);
  // Number of columns with the dimensions and timestamp
  for (RexNode conj : validPreds) {
   final RelOptUtil.InputReferencedVisitor visitor = new RelOptUtil.InputReferencedVisitor();
   conj.accept(visitor);
   if (visitor.inputPosReferenced.contains(timestampFieldIdx)
     && visitor.inputPosReferenced.size() == 1) {
    timeRangeNodes.add(conj);
   } else {
    pushableNodes.add(conj);
   }
  }
  return ImmutableTriple.of(timeRangeNodes, pushableNodes, nonPushableNodes);
 }
}
origin: com.facebook.presto.hive/hive-apache

private Double getMaxNDV(RexCall call) {
 double tmpNDV;
 double maxNDV = 1.0;
 InputReferencedVisitor irv;
 for (RexNode op : call.getOperands()) {
  if (op instanceof RexInputRef) {
   tmpNDV = HiveRelMdDistinctRowCount.getDistinctRowCount(this.childRel,
     ((RexInputRef) op).getIndex());
   if (tmpNDV > maxNDV)
    maxNDV = tmpNDV;
  } else {
   irv = new InputReferencedVisitor();
   irv.apply(op);
   for (Integer childProjIndx : irv.inputPosReferenced) {
    tmpNDV = HiveRelMdDistinctRowCount.getDistinctRowCount(this.childRel, childProjIndx);
    if (tmpNDV > maxNDV)
     maxNDV = tmpNDV;
   }
  }
 }
 return maxNDV;
}
origin: apache/drill

private Double getMaxNDV(RexCall call) {
 double tmpNDV;
 double maxNDV = 1.0;
 InputReferencedVisitor irv;
 RelMetadataQuery mq = RelMetadataQuery.instance();
 for (RexNode op : call.getOperands()) {
  if (op instanceof RexInputRef) {
   tmpNDV = HiveRelMdDistinctRowCount.getDistinctRowCount(this.childRel, mq,
     ((RexInputRef) op).getIndex());
   if (tmpNDV > maxNDV)
    maxNDV = tmpNDV;
  } else {
   irv = new InputReferencedVisitor();
   irv.apply(op);
   for (Integer childProjIndx : irv.inputPosReferenced) {
    tmpNDV = HiveRelMdDistinctRowCount.getDistinctRowCount(this.childRel,
      mq, childProjIndx);
    if (tmpNDV > maxNDV)
     maxNDV = tmpNDV;
   }
  }
 }
 return maxNDV;
}
origin: apache/hive

private Double getMaxNDV(RexCall call) {
 double tmpNDV;
 double maxNDV = 1.0;
 InputReferencedVisitor irv;
 for (RexNode op : call.getOperands()) {
  if (op instanceof RexInputRef) {
   tmpNDV = HiveRelMdDistinctRowCount.getDistinctRowCount(this.childRel, mq,
     ((RexInputRef) op).getIndex());
   if (tmpNDV > maxNDV) {
    maxNDV = tmpNDV;
   }
  } else {
   irv = new InputReferencedVisitor();
   irv.apply(op);
   for (Integer childProjIndx : irv.inputPosReferenced) {
    tmpNDV = HiveRelMdDistinctRowCount.getDistinctRowCount(this.childRel,
      mq, childProjIndx);
    if (tmpNDV > maxNDV) {
     maxNDV = tmpNDV;
    }
   }
  }
 }
 return maxNDV;
}
org.apache.calcite.planRelOptUtil$InputReferencedVisitor<init>

Popular methods of RelOptUtil$InputReferencedVisitor

  • apply

Popular in Java

  • Making http requests using okhttp
  • compareTo (BigDecimal)
  • setContentView (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Menu (java.awt)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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