soumyakanti3578 commented on code in PR #6486:
URL: https://github.com/apache/hive/pull/6486#discussion_r3250455968


##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/mapjoin/VectorMapJoinOuterGenerateResultOperator.java:
##########
@@ -749,13 +754,32 @@ protected void 
generateOuterNullsRepeatedAll(VectorizedRowBatch batch) throws Hi
       colVector.noNulls = false;
       colVector.isNull[0] = true;
       colVector.isRepeating = true;
+      clearVectorValue(colVector, 0);
     }
 
     for (int column : smallTableValueColumnMap) {
       ColumnVector colVector = batch.cols[column];
       colVector.noNulls = false;
       colVector.isNull[0] = true;
       colVector.isRepeating = true;
+      clearVectorValue(colVector, 0);
+    }
+  }
+
+  private static void clearVectorValue(ColumnVector colVector, int index) {
+    if (colVector instanceof LongColumnVector) {
+      ((LongColumnVector) colVector).vector[index] = 0L;
+    } else if (colVector instanceof DoubleColumnVector) {
+      ((DoubleColumnVector) colVector).vector[index] = 0.0;
+    } else if (colVector instanceof BytesColumnVector) {
+      BytesColumnVector bcv = (BytesColumnVector) colVector;
+      bcv.vector[index] = null;
+      bcv.start[index] = 0;
+      bcv.length[index] = 0;
+    } else if (colVector instanceof TimestampColumnVector) {
+      ((TimestampColumnVector) colVector).setNullValue(index);
+    } else if (colVector instanceof IntervalDayTimeColumnVector) {
+      ((IntervalDayTimeColumnVector) colVector).setNullValue(index);

Review Comment:
   Can you please confirm that these are the only `ColumnVector`s that can 
appear in `smallTableValueColumnMap` and `outerSmallTableKeyColumnMap`?
   Maybe we should do the same for all `ColumnVector` types, and it would be 
better to do this in the individual classes instead of handling it here. 



-- 
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