Tabnine Logo
RexTableInputRef.of
Code IndexAdd Tabnine to your IDE (free)

How to use
of
method
in
org.apache.calcite.rex.RexTableInputRef

Best Java code snippets using org.apache.calcite.rex.RexTableInputRef.of (Showing top 12 results out of 315)

origin: apache/hive

  tRef.getTable().getRowType().getFieldList().get(foreignKeyPos).getType();
RexTableInputRef foreignKeyColumnRef =
  RexTableInputRef.of(tRef, foreignKeyPos, foreignKeyColumnType);
int uniqueKeyPos = constraint.getColumnPairs().get(pos).target;
RexTableInputRef uniqueKeyColumnRef = RexTableInputRef.of(nonFkTable, uniqueKeyPos,
  nonFkTable.getTable().getRowType().getFieldList().get(uniqueKeyPos).getType());
if (ecT.getEquivalenceClassesMap().containsKey(uniqueKeyColumnRef) &&
origin: apache/hive

  tRef.getTable().getRowType().getFieldList().get(foreignKeyPos).getType();
RexTableInputRef foreignKeyColumnRef =
  RexTableInputRef.of(tRef, foreignKeyPos, foreignKeyColumnType);
int uniqueKeyPos = constraint.getColumnPairs().get(pos).target;
RexTableInputRef uniqueKeyColumnRef = RexTableInputRef.of(nonFkTable, uniqueKeyPos,
  nonFkTable.getTable().getRowType().getFieldList().get(uniqueKeyPos).getType());
if (ecT.getEquivalenceClassesMap().containsKey(uniqueKeyColumnRef) &&
origin: Qihoo360/Quicksql

 @Override public RexNode visitTableInputRef(RexTableInputRef inputRef) {
  if (ec != null) {
   Set<RexTableInputRef> s = ec.get(inputRef);
   if (s != null) {
    inputRef = s.iterator().next();
   }
  }
  if (tableMapping != null) {
   inputRef = RexTableInputRef.of(
     tableMapping.get(inputRef.getTableRef()),
     inputRef.getIndex(),
     inputRef.getType());
  }
  return inputRef;
 }
};
origin: org.apache.calcite/calcite-core

 @Override public RexNode visitTableInputRef(RexTableInputRef inputRef) {
  if (tableMapping != null) {
   inputRef = RexTableInputRef.of(
     tableMapping.get(inputRef.getTableRef()),
     inputRef.getIndex(),
     inputRef.getType());
  }
  if (ec != null) {
   Set<RexTableInputRef> s = ec.get(inputRef);
   if (s != null) {
    inputRef = s.iterator().next();
   }
  }
  return inputRef;
 }
};
origin: Qihoo360/Quicksql

 @Override public RexNode visitTableInputRef(RexTableInputRef inputRef) {
  if (tableMapping != null) {
   inputRef = RexTableInputRef.of(
     tableMapping.get(inputRef.getTableRef()),
     inputRef.getIndex(),
     inputRef.getType());
  }
  if (ec != null) {
   Set<RexTableInputRef> s = ec.get(inputRef);
   if (s != null) {
    inputRef = s.iterator().next();
   }
  }
  return inputRef;
 }
};
origin: org.apache.calcite/calcite-core

 @Override public RexNode visitTableInputRef(RexTableInputRef inputRef) {
  if (ec != null) {
   Set<RexTableInputRef> s = ec.get(inputRef);
   if (s != null) {
    inputRef = s.iterator().next();
   }
  }
  if (tableMapping != null) {
   inputRef = RexTableInputRef.of(
     tableMapping.get(inputRef.getTableRef()),
     inputRef.getIndex(),
     inputRef.getType());
  }
  return inputRef;
 }
};
origin: org.apache.calcite/calcite-core

  tRef.getTable().getRowType().getFieldList().get(foreignKeyPos).getType();
RexTableInputRef foreignKeyColumnRef =
  RexTableInputRef.of(tRef, foreignKeyPos, foreignKeyColumnType);
int uniqueKeyPos = constraint.getColumnPairs().get(pos).target;
RexTableInputRef uniqueKeyColumnRef = RexTableInputRef.of(parentTRef, uniqueKeyPos,
  parentTRef.getTable().getRowType().getFieldList().get(uniqueKeyPos).getType());
if (!foreignKeyColumnType.isNullable()
origin: Qihoo360/Quicksql

  tRef.getTable().getRowType().getFieldList().get(foreignKeyPos).getType();
RexTableInputRef foreignKeyColumnRef =
  RexTableInputRef.of(tRef, foreignKeyPos, foreignKeyColumnType);
int uniqueKeyPos = constraint.getColumnPairs().get(pos).target;
RexTableInputRef uniqueKeyColumnRef = RexTableInputRef.of(parentTRef, uniqueKeyPos,
  parentTRef.getTable().getRowType().getFieldList().get(uniqueKeyPos).getType());
if (!foreignKeyColumnType.isNullable()
origin: Qihoo360/Quicksql

/**
 * Expression lineage from {@link TableScan}.
 *
 * <p>We extract the fields referenced by the expression and we express them
 * using {@link RexTableInputRef}.
 */
public Set<RexNode> getExpressionLineage(TableScan rel,
  RelMetadataQuery mq, RexNode outputExpression) {
 final RexBuilder rexBuilder = rel.getCluster().getRexBuilder();
 // Extract input fields referenced by expression
 final Set<RelDataTypeField> inputExtraFields = new LinkedHashSet<>();
 final RelOptUtil.InputFinder inputFinder = new RelOptUtil.InputFinder(inputExtraFields);
 outputExpression.accept(inputFinder);
 final ImmutableBitSet inputFieldsUsed = inputFinder.inputBitSet.build();
 // Infer column origin expressions for given references
 final Map<RexInputRef, Set<RexNode>> mapping = new LinkedHashMap<>();
 for (int idx : inputFieldsUsed) {
  final RexNode inputRef = RexTableInputRef.of(
    RelTableRef.of(rel.getTable(), 0),
    RexInputRef.of(idx, rel.getRowType().getFieldList()));
  final RexInputRef ref = RexInputRef.of(idx, rel.getRowType().getFieldList());
  mapping.put(ref, ImmutableSet.of(inputRef));
 }
 // Return result
 return createAllPossibleExpressions(rexBuilder, outputExpression, mapping);
}
origin: org.apache.calcite/calcite-core

/**
 * Expression lineage from {@link TableScan}.
 *
 * <p>We extract the fields referenced by the expression and we express them
 * using {@link RexTableInputRef}.
 */
public Set<RexNode> getExpressionLineage(TableScan rel,
  RelMetadataQuery mq, RexNode outputExpression) {
 final RexBuilder rexBuilder = rel.getCluster().getRexBuilder();
 // Extract input fields referenced by expression
 final ImmutableBitSet inputFieldsUsed = extractInputRefs(outputExpression);
 // Infer column origin expressions for given references
 final Map<RexInputRef, Set<RexNode>> mapping = new LinkedHashMap<>();
 for (int idx : inputFieldsUsed) {
  final RexNode inputRef = RexTableInputRef.of(
    RelTableRef.of(rel.getTable(), 0),
    RexInputRef.of(idx, rel.getRowType().getFieldList()));
  final RexInputRef ref = RexInputRef.of(idx, rel.getRowType().getFieldList());
  mapping.put(ref, ImmutableSet.of(inputRef));
 }
 // Return result
 return createAllPossibleExpressions(rexBuilder, outputExpression, mapping);
}
origin: Qihoo360/Quicksql

RexTableInputRef queryColumnRef = RexTableInputRef.of(queryTableRef,
  e.getKey().getIndex(), e.getKey().getType());
origin: org.apache.calcite/calcite-core

RexTableInputRef queryColumnRef = RexTableInputRef.of(queryTableRef,
  e.getKey().getIndex(), e.getKey().getType());
org.apache.calcite.rexRexTableInputRefof

Popular methods of RexTableInputRef

  • getIndex
  • getTableRef
  • <init>
  • getIdentifier
  • getQualifiedName
  • getType
  • toString

Popular in Java

  • Finding current android device location
  • startActivity (Activity)
  • findViewById (Activity)
  • getSystemService (Context)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • Time (java.sql)
    Java representation of an SQL TIME value. Provides utilities to format and parse the time's represen
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • JOptionPane (javax.swing)
  • Best plugins for Eclipse
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