This is an automated email from the ASF dual-hosted git repository.
hashutosh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git
The following commit(s) were added to refs/heads/master by this push:
new 1e15791 HIVE-22987 : ClassCastException in VectorCoalesce when
DataTypePhysicalVariation is null (Ramesh Kumar via Ashutosh Chauhan)
1e15791 is described below
commit 1e15791987098a177625b16b468e96021fb6dd29
Author: RAMESH KUMAR THANGARAJAN <[email protected]>
AuthorDate: Tue Mar 10 07:38:14 2020 -0700
HIVE-22987 : ClassCastException in VectorCoalesce when
DataTypePhysicalVariation is null (Ramesh Kumar via Ashutosh Chauhan)
Signed-off-by: Ashutosh Chauhan <[email protected]>
---
.../apache/hadoop/hive/ql/exec/vector/VectorizationContext.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git
a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java
b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java
index 043fdd6..dc12d61 100644
---
a/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java
+++
b/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizationContext.java
@@ -2480,7 +2480,8 @@ import com.google.common.annotations.VisibleForTesting;
inputColumns[i] = ve.getOutputColumnNum();
inputTypeInfos[i] = ve.getOutputTypeInfo();
inputDataTypePhysicalVariations[i] =
ve.getOutputDataTypePhysicalVariation();
- if (inputDataTypePhysicalVariations[i] ==
DataTypePhysicalVariation.NONE) {
+ if (inputDataTypePhysicalVariations[i] == DataTypePhysicalVariation.NONE
||
+ inputDataTypePhysicalVariations[i] == null) {
if (childExpr.get(i) instanceof ExprNodeConstantDesc &&
inputTypeInfos[i] instanceof DecimalTypeInfo &&
((DecimalTypeInfo)inputTypeInfos[i]).precision() <= 18) {
fixConstants = true;
@@ -2492,8 +2493,8 @@ import com.google.common.annotations.VisibleForTesting;
if (outputDataTypePhysicalVariation ==
DataTypePhysicalVariation.DECIMAL_64 && fixConstants) {
for (int i = 0; i < vectorChildren.length; ++i) {
- if (inputDataTypePhysicalVariations[i] ==
DataTypePhysicalVariation.NONE &&
- vectorChildren[i] instanceof ConstantVectorExpression) {
+ if ((inputDataTypePhysicalVariations[i] ==
DataTypePhysicalVariation.NONE ||
+ inputDataTypePhysicalVariations[i] == null) && vectorChildren[i]
instanceof ConstantVectorExpression) {
ConstantVectorExpression cve =
((ConstantVectorExpression)vectorChildren[i]);
HiveDecimal hd = cve.getDecimalValue();
Long longValue = new
HiveDecimalWritable(hd).serialize64(((DecimalTypeInfo)cve.getOutputTypeInfo()).getScale());