OmniSciDB  b28c0d5765
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
com.mapd.calcite.parser.HeavyDBParser.JoinOperatorChecker Class Reference
+ Inheritance diagram for com.mapd.calcite.parser.HeavyDBParser.JoinOperatorChecker:
+ Collaboration diagram for com.mapd.calcite.parser.HeavyDBParser.JoinOperatorChecker:

Public Member Functions

boolean isEqualityJoinOperator (SqlBasicCall basicCall)
 
Void visit (SqlCall call)
 

Package Functions

boolean containsExpression (SqlNode node)
 

Package Attributes

Set< SqlBasicCall > targetCalls = new HashSet<>()
 

Detailed Description

Definition at line 1801 of file HeavyDBParser.java.

Member Function Documentation

boolean com.mapd.calcite.parser.HeavyDBParser.JoinOperatorChecker.containsExpression ( SqlNode  node)
inlinepackage

Definition at line 1830 of file HeavyDBParser.java.

Referenced by com.mapd.calcite.parser.HeavyDBParser.getPlanner().

1830  {
1831  try {
1832  if (null != node) {
1833  node.accept(this);
1834  for (SqlBasicCall basicCall : targetCalls) {
1835  if (isEqualityJoinOperator(basicCall)) {
1836  throw Util.FoundOne.NULL;
1837  }
1838  }
1839  }
1840  return false;
1841  } catch (Util.FoundOne e) {
1842  return true;
1843  }
1844  }

+ Here is the caller graph for this function:

boolean com.mapd.calcite.parser.HeavyDBParser.JoinOperatorChecker.isEqualityJoinOperator ( SqlBasicCall  basicCall)
inline

Definition at line 1804 of file HeavyDBParser.java.

1804  {
1805  if (null != basicCall) {
1806  if (basicCall.operands.length == 2
1807  && (basicCall.getKind() == SqlKind.EQUALS
1808  || basicCall.getKind() == SqlKind.NOT_EQUALS)
1809  && basicCall.operand(0) instanceof SqlIdentifier
1810  && basicCall.operand(1) instanceof SqlIdentifier) {
1811  return true;
1812  }
1813  }
1814  return false;
1815  }
Void com.mapd.calcite.parser.HeavyDBParser.JoinOperatorChecker.visit ( SqlCall  call)
inline

Definition at line 1818 of file HeavyDBParser.java.

1818  {
1819  if (call instanceof SqlBasicCall) {
1820  targetCalls.add((SqlBasicCall) call);
1821  }
1822  for (SqlNode node : call.getOperandList()) {
1823  if (null != node && !targetCalls.contains(node)) {
1824  node.accept(this);
1825  }
1826  }
1827  return super.visit(call);
1828  }

Member Data Documentation

Set<SqlBasicCall> com.mapd.calcite.parser.HeavyDBParser.JoinOperatorChecker.targetCalls = new HashSet<>()
package

Definition at line 1802 of file HeavyDBParser.java.


The documentation for this class was generated from the following file: