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

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

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

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);
 projsJoinKeysInChildSchema.add(projsFromInputJoinKeysInChildSchema.build());
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);
 projsJoinKeysInChildSchema.add(projsFromInputJoinKeysInChildSchema.build());
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: Qihoo360/Quicksql

final RelOptUtil.InputReferencedVisitor visitor = new RelOptUtil.InputReferencedVisitor();
conj.accept(visitor);
if (visitor.inputPosReferenced.contains(timestampFieldIdx)) {
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/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);
 projsJoinKeysInChildSchema.add(projsFromInputJoinKeysInChildSchema.build());
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

Javadoc

Shuttle that finds the set of inputs that are used.

Most used methods

  • <init>
  • apply

Popular in Java

  • Reading from database using SQL prepared statement
  • startActivity (Activity)
  • getExternalFilesDir (Context)
  • setScale (BigDecimal)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Logger (org.apache.log4j)
    This is the central class in the log4j package. Most logging operations, except configuration, are d
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • 14 Best Plugins for Eclipse
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