[jira] [Work logged] (HIVE-25117) Vector PTF ClassCastException with Decimal64

2021-05-17 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-25117?focusedWorklogId=598437&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-598437
 ]

ASF GitHub Bot logged work on HIVE-25117:
-

Author: ASF GitHub Bot
Created on: 18/May/21 05:56
Start Date: 18/May/21 05:56
Worklog Time Spent: 10m 
  Work Description: ramesh0201 opened a new pull request #2286:
URL: https://github.com/apache/hive/pull/2286


   
   
   ### What changes were proposed in this pull request?
   
   
   
   ### Why are the changes needed?
   
   
   
   ### Does this PR introduce _any_ user-facing change?
   
   
   
   ### How was this patch tested?
   
   


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


Issue Time Tracking
---

Worklog Id: (was: 598437)
Remaining Estimate: 0h
Time Spent: 10m

> 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
> Attachments: vector_ptf_classcast_exception.q
>
>  Time Spent: 10m
>  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)


[jira] [Work logged] (HIVE-25117) Vector PTF ClassCastException with Decimal64

2021-05-19 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-25117?focusedWorklogId=599123&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-599123
 ]

ASF GitHub Bot logged work on HIVE-25117:
-

Author: ASF GitHub Bot
Created on: 19/May/21 10:28
Start Date: 19/May/21 10:28
Worklog Time Spent: 10m 
  Work Description: pgaref commented on a change in pull request #2286:
URL: https://github.com/apache/hive/pull/2286#discussion_r635106215



##
File path: 
ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
##
@@ -4962,9 +4969,8 @@ private static void createVectorPTFDesc(Operator ptfOp,
 evaluatorWindowFrameDefs,
 evaluatorInputExprNodeDescLists);
 
-TypeInfo[] reducerBatchTypeInfos = vContext.getAllTypeInfos();
-
 vectorPTFDesc.setReducerBatchTypeInfos(reducerBatchTypeInfos);
+
vectorPTFDesc.setReducerBatchDataTypePhysicalVariations(reducerBatchDataTypePhysicalVariations);

Review comment:
   Shall we have setReducerBatchTypeInfos(Types, TypeVariations) instead of 
creating a separate method?
   Seems like a good practice making sure we pas TypeVariations along with 
Types.

##
File path: ql/src/java/org/apache/hadoop/hive/ql/plan/VectorPTFDesc.java
##
@@ -487,10 +495,18 @@ public void setOutputColumnNames(String[] 
outputColumnNames) {
 return outputTypeInfos;
   }
 
+  public DataTypePhysicalVariation[] getOutputDataTypePhysicalVariations() {
+return outputDataTypePhysicalVariations;
+  }
+
   public void setOutputTypeInfos(TypeInfo[] outputTypeInfos) {
 this.outputTypeInfos = outputTypeInfos;
   }
 
+  public void setOutputDataTypePhysicalVariations(DataTypePhysicalVariation[] 
outputDataTypePhysicalVariations) {

Review comment:
   As per comment above this can be simplified

##
File path: 
ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
##
@@ -4978,6 +4984,7 @@ private static void createVectorPTFDesc(Operator ptfOp,
 
 vectorPTFDesc.setOutputColumnNames(outputColumnNames);
 vectorPTFDesc.setOutputTypeInfos(outputTypeInfos);
+
vectorPTFDesc.setOutputDataTypePhysicalVariations(outputDataTypePhysicalVariations);

Review comment:
   Same comment as above for outputTypes

##
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:
   I would expect the ScratchCol Types not to include the initial 
outputCols Types. Why do we need the outputColumn-initialColumnCount here?

##
File path: ql/src/java/org/apache/hadoop/hive/ql/plan/VectorPTFDesc.java
##
@@ -419,6 +422,11 @@ public void setReducerBatchTypeInfos(TypeInfo[] 
reducerBatchTypeInfos) {
 this.reducerBatchTypeInfos = reducerBatchTypeInfos;
   }
 
+  public void setReducerBatchDataTypePhysicalVariations(

Review comment:
   As per comment above this can be simplified




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


Issue Time Tracking
---

Worklog Id: (was: 599123)
Time Spent: 20m  (was: 10m)

> 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: 20m
>  Remaining Estimate: 0h
>
> Only reproduces when there is at least

[jira] [Work logged] (HIVE-25117) Vector PTF ClassCastException with Decimal64

2021-05-23 Thread ASF GitHub Bot (Jira)


 [ 
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:
us...@infra.apache.org


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)


[jira] [Work logged] (HIVE-25117) Vector PTF ClassCastException with Decimal64

2021-05-23 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-25117?focusedWorklogId=601008&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-601008
 ]

ASF GitHub Bot logged work on HIVE-25117:
-

Author: ASF GitHub Bot
Created on: 24/May/21 04:44
Start Date: 24/May/21 04:44
Worklog Time Spent: 10m 
  Work Description: ramesh0201 commented on pull request #2286:
URL: https://github.com/apache/hive/pull/2286#issuecomment-846728695


   None of the vector PTF decimal operators have support for decimal64. Like we 
need to have corresponding decimal64 version for VectorPTFEvaluatorDecimalSum 
and similar classes. I will create a jira to handle this.


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


Issue Time Tracking
---

Worklog Id: (was: 601008)
Time Spent: 40m  (was: 0.5h)

> 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: 40m
>  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)


[jira] [Work logged] (HIVE-25117) Vector PTF ClassCastException with Decimal64

2021-05-23 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-25117?focusedWorklogId=601011&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-601011
 ]

ASF GitHub Bot logged work on HIVE-25117:
-

Author: ASF GitHub Bot
Created on: 24/May/21 04:55
Start Date: 24/May/21 04:55
Worklog Time Spent: 10m 
  Work Description: ramesh0201 commented on a change in pull request #2286:
URL: https://github.com/apache/hive/pull/2286#discussion_r637686832



##
File path: 
ql/src/java/org/apache/hadoop/hive/ql/optimizer/physical/Vectorizer.java
##
@@ -4962,9 +4969,8 @@ private static void createVectorPTFDesc(Operator ptfOp,
 evaluatorWindowFrameDefs,
 evaluatorInputExprNodeDescLists);
 
-TypeInfo[] reducerBatchTypeInfos = vContext.getAllTypeInfos();
-
 vectorPTFDesc.setReducerBatchTypeInfos(reducerBatchTypeInfos);
+
vectorPTFDesc.setReducerBatchDataTypePhysicalVariations(reducerBatchDataTypePhysicalVariations);

Review comment:
   Resolved thanks




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


Issue Time Tracking
---

Worklog Id: (was: 601011)
Time Spent: 50m  (was: 40m)

> 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: 50m
>  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)


[jira] [Work logged] (HIVE-25117) Vector PTF ClassCastException with Decimal64

2021-06-07 Thread ASF GitHub Bot (Jira)


 [ 
https://issues.apache.org/jira/browse/HIVE-25117?focusedWorklogId=607738&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-607738
 ]

ASF GitHub Bot logged work on HIVE-25117:
-

Author: ASF GitHub Bot
Created on: 07/Jun/21 09:34
Start Date: 07/Jun/21 09:34
Worklog Time Spent: 10m 
  Work Description: pgaref merged pull request #2286:
URL: https://github.com/apache/hive/pull/2286


   


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


Issue Time Tracking
---

Worklog Id: (was: 607738)
Time Spent: 1h  (was: 50m)

> 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: 1h
>  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)