kgyrtkirk commented on a change in pull request #2891:
URL: https://github.com/apache/hive/pull/2891#discussion_r772151007



##########
File path: 
ql/src/java/org/apache/hadoop/hive/ql/exec/CommonMergeJoinOperator.java
##########
@@ -302,7 +322,47 @@ public void process(Object row, int tag) throws 
HiveException {
 
     assert !nextKeyGroup;
     candidateStorage[tag].addRow(value);
+  }
+
+  private void emitExtensionRow(int tag, List<Object> value) throws 
HiveException {
+    extensionStorage[tag].addRow(value);
+    for (byte i = 0; i < order.length; i++) {
+      if (i == tag) {
+        storage[i] = extensionStorage[i];
+      } else {
+        putDummyOrEmpty(i);
+      }
+    }
+    checkAndGenObject();
+    extensionStorage[tag].clearRows();
+  }
 
+  /**
+   * Decides if the actual row must be an extension row.
+   *
+   * Extension rows are those which are not part of the inner-join.
+   * May not correctly identify all extension rows - but will remove trivially 
filtered ones.

Review comment:
       > May not identify all extension rows
   
   it could not identify non-trivial ones like that no rows could satisfy the 
`l.id=r.id and l.id+2*r.id=1` condition...
   guess what...running:
   ```
   select * from t_xy l full outer join t_y r on (l.id=r.id and l.s='y' and 
l.id+2*r.id=1);
   ```
   resulted in incorrect results as well...
   
   this will leave me no choice but to remove that `skip` crap and replace it 
with something decent....




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to