[
https://issues.apache.org/jira/browse/HIVE-25117?focusedWorklogId=601005&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-601005
]
ASF GitHub Bot logged work on HIVE-25117:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 24/May/21 03:45
Start Date: 24/May/21 03:45
Worklog Time Spent: 10m
Work Description: 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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 601005)
Time Spent: 0.5h (was: 20m)
> Vector PTF ClassCastException with Decimal64
> --------------------------------------------
>
> Key: HIVE-25117
> URL: https://issues.apache.org/jira/browse/HIVE-25117
> Project: Hive
> Issue Type: Bug
> Reporter: Panagiotis Garefalakis
> Assignee: Ramesh Kumar Thangarajan
> Priority: Major
> Labels: pull-request-available
> Attachments: vector_ptf_classcast_exception.q
>
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Only reproduces when there is at least 1 buffered batch, so needed 2 rows
> with 1 row/batch:
> {code:java}
> set hive.vectorized.testing.reducer.batch.size=1;
> {code}
> {code:java}
> Caused by: java.lang.ClassCastException:
> org.apache.hadoop.hive.ql.exec.vector.DecimalColumnVector cannot be cast to
> org.apache.hadoop.hive.ql.exec.vector.LongColumnVector
> at
> org.apache.hadoop.hive.ql.exec.vector.VectorizedBatchUtil.copyNonSelectedColumnVector(VectorizedBatchUtil.java:664)
> at
> org.apache.hadoop.hive.ql.exec.vector.ptf.VectorPTFGroupBatches.forwardBufferedBatches(VectorPTFGroupBatches.java:228)
> at
> org.apache.hadoop.hive.ql.exec.vector.ptf.VectorPTFGroupBatches.fillGroupResultsAndForward(VectorPTFGroupBatches.java:318)
> at
> org.apache.hadoop.hive.ql.exec.vector.ptf.VectorPTFOperator.process(VectorPTFOperator.java:403)
> at
> org.apache.hadoop.hive.ql.exec.Operator.vectorForward(Operator.java:919)
> at
> org.apache.hadoop.hive.ql.exec.vector.VectorSelectOperator.process(VectorSelectOperator.java:158)
> at
> org.apache.hadoop.hive.ql.exec.tez.ReduceRecordSource.processVectorGroup(ReduceRecordSource.java:497)
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)