You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "deniskuzZ (via GitHub)" <gi...@apache.org> on 2023/06/10 10:17:00 UTC
[GitHub] [hive] deniskuzZ commented on a diff in pull request #4389: HIVE-27412: Vectorization: VectorMapOperator does not reset VectorizedRowBatch after processing
deniskuzZ commented on code in PR #4389:
URL: https://github.com/apache/hive/pull/4389#discussion_r1225261143
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorMapOperator.java:
##########
@@ -821,30 +827,30 @@ private boolean deliverVectorizedRowBatch(Writable value) throws HiveException {
*
* See {@link #setupPartitionContextVars(Path)}
*/
- private void resetVectorizedRowBatchForDeserialize() {
+ private void resetVectorizedRowBatch(VectorizedRowBatch rowBatch) {
/**
* Reset existing input columns
*/
for (int c = 0; c < currentDataColumnCount; c++) {
- resetColumnVector(deserializerBatch.cols[c]);
+ resetColumnVector(rowBatch.cols[c]);
}
/**
* Reset output and scratch columns
*/
- for (int c = dataColumnCount + partitionColumnCount; c < deserializerBatch.cols.length; c++) {
+ for (int c = dataColumnCount + partitionColumnCount; c < rowBatch.cols.length; c++) {
if (c == rowIdentifierColumnNum) {
continue;
}
- resetColumnVector(deserializerBatch.cols[c]);
+ resetColumnVector(rowBatch.cols[c]);
}
- deserializerBatch.selectedInUse = false;
- deserializerBatch.size = 0;
- deserializerBatch.endOfFile = false;
+ rowBatch.selectedInUse = false;
+ rowBatch.size = 0;
+ rowBatch.endOfFile = false;
}
private void resetColumnVector(ColumnVector columnVector) {
- if (columnVector != null) {
+ if (columnVector != null && columnVector.getRef() == 0) {
Review Comment:
why do we need `columnVector.getRef() == 0` check?
--
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: gitbox-unsubscribe@hive.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@hive.apache.org
For additional commands, e-mail: gitbox-help@hive.apache.org