ramesh0201 commented on a change in pull request #2286: URL: https://github.com/apache/hive/pull/2286#discussion_r637668639
########## File path: ql/src/java/org/apache/hadoop/hive/ql/exec/vector/ptf/VectorPTFOperator.java ########## @@ -250,13 +253,16 @@ protected VectorizedRowBatch setupOverflowBatch() throws HiveException { for (int i = 0; i < outputProjectionColumnMap.length; i++) { int outputColumn = outputProjectionColumnMap[i]; String typeName = outputTypeInfos[i].getTypeName(); - allocateOverflowBatchColumnVector(overflowBatch, outputColumn, typeName); + allocateOverflowBatchColumnVector(overflowBatch, outputColumn, typeName, outputDataTypePhysicalVariations[i]); } // Now, add any scratch columns needed for children operators. int outputColumn = initialColumnCount; + DataTypePhysicalVariation[] dataTypePhysicalVariations = vOutContext.getScratchDataTypePhysicalVariations(); for (String typeName : vOutContext.getScratchColumnTypeNames()) { - allocateOverflowBatchColumnVector(overflowBatch, outputColumn++, typeName); + allocateOverflowBatchColumnVector(overflowBatch, outputColumn, typeName, + dataTypePhysicalVariations[outputColumn-initialColumnCount]); Review comment: Actually based on the code here, I think we index the scratch column based on the outputColumnNum https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java#L525 https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java#L800 -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org