OmniSciDB  72c90bc290
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule Class Reference
+ Inheritance diagram for org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule:
+ Collaboration diagram for org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule:

Public Member Functions

 OuterJoinOptViaNullRejectionRule (RelBuilderFactory relBuilderFactory)
 
void onMatch (RelOptRuleCall call)
 
- Public Member Functions inherited from org.apache.calcite.rel.rules.QueryOptimizationRules
 QueryOptimizationRules (RelOptRuleOperand operand, RelBuilderFactory relBuilderFactory, String description)
 

Static Public Attributes

static Set< String > visitedJoinMemo = new HashSet<>()
 

Package Functions

void clearMemo ()
 
void addJoinCols (RexCall joinCond, LogicalJoin joinOp, Set< Integer > leftJoinCols, Set< Integer > rightJoinCols, Map< Integer, String > leftJoinColToColNameMap, Map< Integer, String > rightJoinColToColNameMap, Set< Integer > originalLeftJoinCols, Set< Integer > originalRightJoinCols, Map< Integer, String > originalLeftJoinColToColNameMap, Map< Integer, String > originalRightJoinColToColNameMap)
 
void addNullRejectedJoinCols (RexCall call, LogicalFilter targetFilter, Set< Integer > nullRejectedLeftJoinCols, Set< Integer > nullRejectedRightJoinCols, Map< Integer, String > leftJoinColToColNameMap, Map< Integer, String > rightJoinColToColNameMap)
 
void collectFilterCondition (RelNode curNode, List< LogicalFilter > collectedFilterNodes)
 
void collectProjectNode (RelNode curNode, List< LogicalProject > collectedProject)
 
int traceColOffset (RelNode curNode, RexInputRef colRef, int startOffset)
 
boolean isComparisonOp (RexCall c)
 
boolean isNotNullFilter (RexCall c)
 
boolean isCandidateFilterPred (RexCall c)
 

Static Package Attributes

static final Logger HEAVYDBLOGGER
 

Detailed Description

Definition at line 46 of file OuterJoinOptViaNullRejectionRule.java.

Constructor & Destructor Documentation

org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.OuterJoinOptViaNullRejectionRule ( RelBuilderFactory  relBuilderFactory)
inline

Definition at line 77 of file OuterJoinOptViaNullRejectionRule.java.

References org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.clearMemo().

77  {
78  super(operand(RelNode.class, operand(Join.class, null, any())),
79  relBuilderFactory,
80  "OuterJoinOptViaNullRejectionRule");
81  clearMemo();
82  }

+ Here is the call graph for this function:

Member Function Documentation

void org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.addJoinCols ( RexCall  joinCond,
LogicalJoin  joinOp,
Set< Integer >  leftJoinCols,
Set< Integer >  rightJoinCols,
Map< Integer, String >  leftJoinColToColNameMap,
Map< Integer, String >  rightJoinColToColNameMap,
Set< Integer >  originalLeftJoinCols,
Set< Integer >  originalRightJoinCols,
Map< Integer, String >  originalLeftJoinColToColNameMap,
Map< Integer, String >  originalRightJoinColToColNameMap 
)
inlinepackage

Definition at line 332 of file OuterJoinOptViaNullRejectionRule.java.

References org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.traceColOffset().

Referenced by org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.onMatch().

341  {
342  if (joinCond.getOperands().size() != 2
343  || !(joinCond.getOperands().get(0) instanceof RexInputRef)
344  || !(joinCond.getOperands().get(1) instanceof RexInputRef)) {
345  return;
346  }
347  RexInputRef leftJoinCol = (RexInputRef) joinCond.getOperands().get(0);
348  RexInputRef rightJoinCol = (RexInputRef) joinCond.getOperands().get(1);
349  originalLeftJoinCols.add(leftJoinCol.getIndex());
350  originalRightJoinCols.add(rightJoinCol.getIndex());
351  originalLeftJoinColToColNameMap.put(leftJoinCol.getIndex(),
352  joinOp.getRowType().getFieldNames().get(leftJoinCol.getIndex()));
353  originalRightJoinColToColNameMap.put(rightJoinCol.getIndex(),
354  joinOp.getRowType().getFieldNames().get(rightJoinCol.getIndex()));
355  if (leftJoinCol.getIndex() > rightJoinCol.getIndex()) {
356  leftJoinCol = (RexInputRef) joinCond.getOperands().get(1);
357  rightJoinCol = (RexInputRef) joinCond.getOperands().get(0);
358  }
359  int originalLeftColOffset = traceColOffset(joinOp.getLeft(), leftJoinCol, 0);
360  int originalRightColOffset = traceColOffset(joinOp.getRight(),
361  rightJoinCol,
362  joinOp.getLeft().getRowType().getFieldCount());
363  if (originalLeftColOffset != -1) {
364  return;
365  }
366  int leftColOffset =
367  originalLeftColOffset == -1 ? leftJoinCol.getIndex() : originalLeftColOffset;
368  int rightColOffset = originalRightColOffset == -1 ? rightJoinCol.getIndex()
369  : originalRightColOffset;
370  String leftJoinColName = joinOp.getRowType().getFieldNames().get(leftColOffset);
371  String rightJoinColName =
372  joinOp.getRowType().getFieldNames().get(rightJoinCol.getIndex());
373  leftJoinCols.add(leftColOffset);
374  rightJoinCols.add(rightColOffset);
375  leftJoinColToColNameMap.put(leftColOffset, leftJoinColName);
376  rightJoinColToColNameMap.put(rightColOffset, rightJoinColName);
377  return;
378  }
int traceColOffset(RelNode curNode, RexInputRef colRef, int startOffset)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.addNullRejectedJoinCols ( RexCall  call,
LogicalFilter  targetFilter,
Set< Integer >  nullRejectedLeftJoinCols,
Set< Integer >  nullRejectedRightJoinCols,
Map< Integer, String >  leftJoinColToColNameMap,
Map< Integer, String >  rightJoinColToColNameMap 
)
inlinepackage

Definition at line 380 of file OuterJoinOptViaNullRejectionRule.java.

References org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.isCandidateFilterPred().

Referenced by org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.onMatch().

385  {
386  if (isCandidateFilterPred(call) && call.getOperands().get(0) instanceof RexInputRef) {
387  RexInputRef col = (RexInputRef) call.getOperands().get(0);
388  int colId = col.getIndex();
389  String colName = targetFilter.getRowType().getFieldNames().get(colId);
390  Boolean l = false;
391  Boolean r = false;
392  if (leftJoinColToColNameMap.containsKey(colId)
393  && leftJoinColToColNameMap.get(colId).equals(colName)) {
394  l = true;
395  }
396  if (rightJoinColToColNameMap.containsKey(colId)
397  && rightJoinColToColNameMap.get(colId).equals(colName)) {
398  r = true;
399  }
400  if (l && !r) {
401  nullRejectedLeftJoinCols.add(colId);
402  return;
403  }
404  if (r && !l) {
405  nullRejectedRightJoinCols.add(colId);
406  return;
407  }
408  }
409  }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.clearMemo ( )
inlinepackage

Definition at line 84 of file OuterJoinOptViaNullRejectionRule.java.

Referenced by org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.OuterJoinOptViaNullRejectionRule().

84  {
85  visitedJoinMemo.clear();
86  }

+ Here is the caller graph for this function:

void org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.collectFilterCondition ( RelNode  curNode,
List< LogicalFilter >  collectedFilterNodes 
)
inlinepackage

Definition at line 411 of file OuterJoinOptViaNullRejectionRule.java.

Referenced by org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.onMatch().

411  {
412  if (curNode instanceof HepRelVertex) {
413  curNode = ((HepRelVertex) curNode).getCurrentRel();
414  }
415  if (curNode instanceof LogicalFilter) {
416  collectedFilterNodes.add((LogicalFilter) curNode);
417  }
418  if (curNode.getInputs().size() == 0) {
419  // end of the query plan, move out
420  return;
421  }
422  for (int i = 0; i < curNode.getInputs().size(); i++) {
423  collectFilterCondition(curNode.getInput(i), collectedFilterNodes);
424  }
425  }
void collectFilterCondition(RelNode curNode, List< LogicalFilter > collectedFilterNodes)

+ Here is the caller graph for this function:

void org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.collectProjectNode ( RelNode  curNode,
List< LogicalProject >  collectedProject 
)
inlinepackage

Definition at line 427 of file OuterJoinOptViaNullRejectionRule.java.

Referenced by org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.traceColOffset().

427  {
428  if (curNode instanceof HepRelVertex) {
429  curNode = ((HepRelVertex) curNode).getCurrentRel();
430  }
431  if (curNode instanceof LogicalProject) {
432  collectedProject.add((LogicalProject) curNode);
433  }
434  if (curNode.getInputs().size() == 0) {
435  // end of the query plan, move out
436  return;
437  }
438  for (int i = 0; i < curNode.getInputs().size(); i++) {
439  collectProjectNode(curNode.getInput(i), collectedProject);
440  }
441  }
void collectProjectNode(RelNode curNode, List< LogicalProject > collectedProject)

+ Here is the caller graph for this function:

boolean org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.isCandidateFilterPred ( RexCall  c)
inlinepackage

Definition at line 474 of file OuterJoinOptViaNullRejectionRule.java.

References org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.isComparisonOp(), and org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.isNotNullFilter().

Referenced by org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.addNullRejectedJoinCols(), and org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.onMatch().

474  {
475  return (isNotNullFilter(c)
476  || (c.operands.size() == 2 && isComparisonOp(c)
477  && c.operands.get(0) instanceof RexInputRef
478  && c.operands.get(1) instanceof RexLiteral));
479  }

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

boolean org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.isComparisonOp ( RexCall  c)
inlinepackage

Definition at line 464 of file OuterJoinOptViaNullRejectionRule.java.

Referenced by org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.isCandidateFilterPred().

464  {
465  SqlKind opKind = c.getKind();
466  return (SqlKind.BINARY_COMPARISON.contains(opKind)
467  || SqlKind.BINARY_EQUALITY.contains(opKind));
468  }

+ Here is the caller graph for this function:

boolean org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.isNotNullFilter ( RexCall  c)
inlinepackage

Definition at line 470 of file OuterJoinOptViaNullRejectionRule.java.

Referenced by org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.isCandidateFilterPred().

470  {
471  return (c.op.kind == SqlKind.IS_NOT_NULL && c.operands.size() == 1);
472  }

+ Here is the caller graph for this function:

void org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.onMatch ( RelOptRuleCall  call)
inline

Definition at line 89 of file OuterJoinOptViaNullRejectionRule.java.

References org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.addJoinCols(), org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.addNullRejectedJoinCols(), org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.collectFilterCondition(), org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.isCandidateFilterPred(), join(), anonymous_namespace{Utm.h}.n, setup.root, toString(), and org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.visitedJoinMemo.

89  {
90  RelNode parentNode = call.rel(0);
91  LogicalJoin join = (LogicalJoin) call.rel(1);
92  String condString = join.getCondition().toString();
93  if (visitedJoinMemo.contains(condString)) {
94  return;
95  } else {
96  visitedJoinMemo.add(condString);
97  }
98  if (!(join.getCondition() instanceof RexCall)) {
99  return; // an inner join
100  }
101  if (join.getJoinType() == JoinRelType.INNER || join.getJoinType() == JoinRelType.SEMI
102  || join.getJoinType() == JoinRelType.ANTI) {
103  return; // non target
104  }
105  RelNode joinLeftChild = ((HepRelVertex) join.getLeft()).getCurrentRel();
106  RelNode joinRightChild = ((HepRelVertex) join.getRight()).getCurrentRel();
107  if (joinLeftChild instanceof LogicalProject) {
108  return; // disable this opt when LHS has subquery (i.e., filter push-down)
109  }
110  if (!(joinRightChild instanceof LogicalTableScan)) {
111  return; // disable this opt when RHS has subquery (i.e., filter push-down)
112  }
113  // an outer join contains its join cond in itself,
114  // not in a filter as typical inner join op. does
115  RexCall joinCond = (RexCall) join.getCondition();
116  Set<Integer> leftJoinCols = new HashSet<>();
117  Set<Integer> rightJoinCols = new HashSet<>();
118  Map<Integer, String> leftJoinColToColNameMap = new HashMap<>();
119  Map<Integer, String> rightJoinColToColNameMap = new HashMap<>();
120  Set<Integer> originalLeftJoinCols = new HashSet<>();
121  Set<Integer> originalRightJoinCols = new HashSet<>();
122  Map<Integer, String> originalLeftJoinColToColNameMap = new HashMap<>();
123  Map<Integer, String> originalRightJoinColToColNameMap = new HashMap<>();
124  List<RexCall> capturedFilterPredFromJoin = new ArrayList<>();
125  if (joinCond.getKind() == SqlKind.EQUALS) {
126  addJoinCols(joinCond,
127  join,
128  leftJoinCols,
129  rightJoinCols,
130  leftJoinColToColNameMap,
131  rightJoinColToColNameMap,
132  originalLeftJoinCols,
133  originalRightJoinCols,
134  originalLeftJoinColToColNameMap,
135  originalRightJoinColToColNameMap);
136  // we only consider ANDED exprs
137  } else if (joinCond.getKind() == SqlKind.AND) {
138  for (RexNode n : joinCond.getOperands()) {
139  if (n instanceof RexCall) {
140  RexCall op = (RexCall) n;
141  if (op.getOperands().size() > 2
142  && op.getOperands().get(1) instanceof RexLiteral) {
143  // try to capture literal comparison of join column located in the cur join
144  // node
145  capturedFilterPredFromJoin.add(op);
146  continue;
147  }
148  addJoinCols(op,
149  join,
150  leftJoinCols,
151  rightJoinCols,
152  leftJoinColToColNameMap,
153  rightJoinColToColNameMap,
154  originalLeftJoinCols,
155  originalRightJoinCols,
156  originalLeftJoinColToColNameMap,
157  originalRightJoinColToColNameMap);
158  }
159  }
160  }
161 
162  if (leftJoinCols.isEmpty() || rightJoinCols.isEmpty()) {
163  return;
164  }
165 
166  // find filter node(s)
167  RelNode root = call.getPlanner().getRoot();
168  List<LogicalFilter> collectedFilterNodes = new ArrayList<>();
169  RelNode curNode = root;
170  final RelBuilder relBuilder = call.builder();
171  // collect filter nodes
172  collectFilterCondition(curNode, collectedFilterNodes);
173  if (collectedFilterNodes.isEmpty()) {
174  // we have a last chance to take a look at this join condition itself
175  // i.e., the filter preds lay with the join conditions in the same join node
176  // but for now we disable the optimization to avoid unexpected plan issue
177  return;
178  }
179 
180  // check whether join column has filter predicate(s)
181  // and collect join column info used in target join nodes to be translated
182  Set<Integer> nullRejectedLeftJoinCols = new HashSet<>();
183  Set<Integer> nullRejectedRightJoinCols = new HashSet<>();
184  boolean hasExprsConnectedViaOR = false;
185  for (LogicalFilter filter : collectedFilterNodes) {
186  RexNode node = filter.getCondition();
187  if (node instanceof RexCall) {
188  RexCall curExpr = (RexCall) node;
189  // we only consider ANDED exprs
190  if (curExpr.getKind() == SqlKind.OR) {
191  hasExprsConnectedViaOR = true;
192  break;
193  }
194  if (curExpr.getKind() == SqlKind.AND) {
195  for (RexNode n : curExpr.getOperands()) {
196  if (n instanceof RexCall) {
197  RexCall c = (RexCall) n;
198  if (isCandidateFilterPred(c)
199  && c.getOperands().get(0) instanceof RexInputRef) {
200  RexInputRef col = (RexInputRef) c.getOperands().get(0);
201  int colId = col.getIndex();
202  boolean leftFilter = leftJoinCols.contains(colId);
203  boolean rightFilter = rightJoinCols.contains(colId);
204  if (leftFilter && rightFilter) {
205  // here we currently do not have a concrete column tracing logic
206  // so it may become a source of plan issue, so we disable this opt
207  return;
208  }
210  filter,
211  nullRejectedLeftJoinCols,
212  nullRejectedRightJoinCols,
213  leftJoinColToColNameMap,
214  rightJoinColToColNameMap);
215  }
216  }
217  }
218  } else {
219  if (curExpr instanceof RexCall) {
220  if (isCandidateFilterPred(curExpr)
221  && curExpr.getOperands().get(0) instanceof RexInputRef) {
222  RexInputRef col = (RexInputRef) curExpr.getOperands().get(0);
223  int colId = col.getIndex();
224  boolean leftFilter = leftJoinCols.contains(colId);
225  boolean rightFilter = rightJoinCols.contains(colId);
226  if (leftFilter && rightFilter) {
227  // here we currently do not have a concrete column tracing logic
228  // so it may become a source of plan issue, so we disable this opt
229  return;
230  }
231  addNullRejectedJoinCols(curExpr,
232  filter,
233  nullRejectedLeftJoinCols,
234  nullRejectedRightJoinCols,
235  leftJoinColToColNameMap,
236  rightJoinColToColNameMap);
237  }
238  }
239  }
240  }
241  }
242 
243  // we skip to optimize this query since analyzing complex filter exprs
244  // connected via OR condition is complex and risky
245  if (hasExprsConnectedViaOR) {
246  return;
247  }
248 
249  if (!capturedFilterPredFromJoin.isEmpty()) {
250  for (RexCall c : capturedFilterPredFromJoin) {
251  if (c.getOperands().get(0) instanceof RexInputRef) {
252  RexInputRef col = (RexInputRef) c.getOperands().get(0);
253  int colId = col.getIndex();
254  String colName = join.getRowType().getFieldNames().get(colId);
255  Boolean l = false;
256  Boolean r = false;
257  if (originalLeftJoinColToColNameMap.containsKey(colId)
258  && originalLeftJoinColToColNameMap.get(colId).equals(colName)) {
259  l = true;
260  }
261  if (originalRightJoinColToColNameMap.containsKey(colId)
262  && originalRightJoinColToColNameMap.get(colId).equals(colName)) {
263  r = true;
264  }
265  if (l && !r) {
266  nullRejectedLeftJoinCols.add(colId);
267  } else if (r && !l) {
268  nullRejectedRightJoinCols.add(colId);
269  } else if (r && l) {
270  return;
271  }
272  }
273  }
274  }
275 
276  Boolean leftNullRejected = false;
277  Boolean rightNullRejected = false;
278  if (!nullRejectedLeftJoinCols.isEmpty()
279  && leftJoinCols.equals(nullRejectedLeftJoinCols)) {
280  leftNullRejected = true;
281  }
282  if (!nullRejectedRightJoinCols.isEmpty()
283  && rightJoinCols.equals(nullRejectedRightJoinCols)) {
284  rightNullRejected = true;
285  }
286 
287  // relax outer join condition depending on null rejected cols
288  RelNode newJoinNode = null;
289  Boolean needTransform = false;
290  if (join.getJoinType() == JoinRelType.FULL) {
291  // 1) full -> left
292  if (leftNullRejected && !rightNullRejected) {
293  newJoinNode = join.copy(join.getTraitSet(),
294  join.getCondition(),
295  join.getLeft(),
296  join.getRight(),
297  JoinRelType.LEFT,
298  join.isSemiJoinDone());
299  needTransform = true;
300  }
301 
302  // 2) full -> inner
303  if (leftNullRejected && rightNullRejected) {
304  newJoinNode = join.copy(join.getTraitSet(),
305  join.getCondition(),
306  join.getLeft(),
307  join.getRight(),
308  JoinRelType.INNER,
309  join.isSemiJoinDone());
310  needTransform = true;
311  }
312  } else if (join.getJoinType() == JoinRelType.LEFT) {
313  // 3) left -> inner
314  if (rightNullRejected) {
315  newJoinNode = join.copy(join.getTraitSet(),
316  join.getCondition(),
317  join.getLeft(),
318  join.getRight(),
319  JoinRelType.INNER,
320  join.isSemiJoinDone());
321  needTransform = true;
322  }
323  }
324  if (needTransform) {
325  relBuilder.push(newJoinNode);
326  parentNode.replaceInput(0, newJoinNode);
327  call.transformTo(parentNode);
328  }
329  return;
330  }
void collectFilterCondition(RelNode curNode, List< LogicalFilter > collectedFilterNodes)
void addNullRejectedJoinCols(RexCall call, LogicalFilter targetFilter, Set< Integer > nullRejectedLeftJoinCols, Set< Integer > nullRejectedRightJoinCols, Map< Integer, String > leftJoinColToColNameMap, Map< Integer, String > rightJoinColToColNameMap)
std::string join(T const &container, std::string const &delim)
tuple root
Definition: setup.in.py:14
std::string toString(const QueryDescriptionType &type)
Definition: Types.h:64
void addJoinCols(RexCall joinCond, LogicalJoin joinOp, Set< Integer > leftJoinCols, Set< Integer > rightJoinCols, Map< Integer, String > leftJoinColToColNameMap, Map< Integer, String > rightJoinColToColNameMap, Set< Integer > originalLeftJoinCols, Set< Integer > originalRightJoinCols, Map< Integer, String > originalLeftJoinColToColNameMap, Map< Integer, String > originalRightJoinColToColNameMap)
constexpr double n
Definition: Utm.h:38

+ Here is the call graph for this function:

int org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.traceColOffset ( RelNode  curNode,
RexInputRef  colRef,
int  startOffset 
)
inlinepackage

Definition at line 443 of file OuterJoinOptViaNullRejectionRule.java.

References org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.collectProjectNode().

Referenced by org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.addJoinCols().

443  {
444  int colOffset = -1;
445  ArrayList<LogicalProject> collectedProjectNodes = new ArrayList<>();
446  collectProjectNode(curNode, collectedProjectNodes);
447  // the nearest project node that may permute the column offset
448  if (!collectedProjectNodes.isEmpty()) {
449  // get the closest project node from the cur join node's target child
450  LogicalProject projectNode = collectedProjectNodes.get(0);
451  Mappings.TargetMapping targetMapping = projectNode.getMapping();
452  if (null != colRef && null != targetMapping) {
453  // try to track the original col offset
454  int base_offset = colRef.getIndex() - startOffset;
455 
456  if (base_offset >= 0 && base_offset < targetMapping.getSourceCount()) {
457  colOffset = targetMapping.getSourceOpt(base_offset);
458  }
459  }
460  }
461  return colOffset;
462  }
void collectProjectNode(RelNode curNode, List< LogicalProject > collectedProject)

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

final Logger org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.HEAVYDBLOGGER
staticpackage
Initial value:
=
LoggerFactory.getLogger(OuterJoinOptViaNullRejectionRule.class)

Definition at line 74 of file OuterJoinOptViaNullRejectionRule.java.

Set<String> org.apache.calcite.rel.rules.OuterJoinOptViaNullRejectionRule.visitedJoinMemo = new HashSet<>()
static

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