You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "Indhumathi27 (via GitHub)" <gi...@apache.org> on 2025/07/10 18:42:01 UTC
[PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Indhumathi27 opened a new pull request, #5953:
URL: https://github.com/apache/hive/pull/5953
### What changes were proposed in this pull request?
Updated the way decimal partition column values are set in vectorized execution. It ensures that the full decimal value, including its precision and scale, is correctly preserved when loading partition data into the vectorized engine.
### Why are the changes needed?
The previous approach lost decimal precision and scale, causing incorrect results for joins and group by operations on partitioned decimal columns when vectorization is enabled. The fix ensures correct query results by accurately setting the decimal value.
### Does this PR introduce _any_ user-facing change?
No
### How was this patch tested?
Testcase added
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #5953:
URL: https://github.com/apache/hive/pull/5953#discussion_r2199708421
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java:
##########
@@ -574,10 +574,12 @@ public void addPartitionColsToBatch(ColumnVector col, Object value, int colIndex
if (value == null) {
dv.noNulls = false;
dv.isNull[0] = true;
- dv.isRepeating = true;
} else {
- dv.fill(((HiveDecimal) value).longValue());
+ // fill serialized decimal value
+ dv.set(0, (HiveDecimal) value);
Review Comment:
My bad, I missed that. Why not just `dv.fill((HiveDecimal) value)`
Should we change here as well?
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #5953:
URL: https://github.com/apache/hive/pull/5953#discussion_r2200630003
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java:
##########
@@ -574,10 +574,12 @@ public void addPartitionColsToBatch(ColumnVector col, Object value, int colIndex
if (value == null) {
dv.noNulls = false;
dv.isNull[0] = true;
- dv.isRepeating = true;
} else {
- dv.fill(((HiveDecimal) value).longValue());
+ // fill serialized decimal value
+ dv.set(0, (HiveDecimal) value);
Review Comment:
ideally, we should replace the `fill(long value)` with
````
public void fill(HiveDecimal value) {
isRepeating = true;
isNull[0] = false;
if (vector[0] == null) {
vector[0] = new HiveDecimalWritable(value);
}
set(0, value);
}
````
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #5953:
URL: https://github.com/apache/hive/pull/5953#discussion_r2200630003
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java:
##########
@@ -574,10 +574,12 @@ public void addPartitionColsToBatch(ColumnVector col, Object value, int colIndex
if (value == null) {
dv.noNulls = false;
dv.isNull[0] = true;
- dv.isRepeating = true;
} else {
- dv.fill(((HiveDecimal) value).longValue());
+ // fill serialized decimal value
+ dv.set(0, (HiveDecimal) value);
Review Comment:
ideally, we should add
````
public void fill(HiveDecimal value) {
isRepeating = true;
isNull[0] = false;
if (vector[0] == null) {
vector[0] = new HiveDecimalWritable();
}
set(0, value);
}
````
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "Indhumathi27 (via GitHub)" <gi...@apache.org>.
Indhumathi27 commented on code in PR #5953:
URL: https://github.com/apache/hive/pull/5953#discussion_r2200176185
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java:
##########
@@ -574,10 +574,12 @@ public void addPartitionColsToBatch(ColumnVector col, Object value, int colIndex
if (value == null) {
dv.noNulls = false;
dv.isNull[0] = true;
- dv.isRepeating = true;
} else {
- dv.fill(((HiveDecimal) value).longValue());
+ // fill serialized decimal value
+ dv.set(0, (HiveDecimal) value);
Review Comment:
there is no dv.fill implementation in Decimal64ColumnVector. Either i can implement this in Decimal64ColumnVector or keep current changes. what do you suggest @deniskuzZ ?
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java:
##########
@@ -574,10 +574,12 @@ public void addPartitionColsToBatch(ColumnVector col, Object value, int colIndex
if (value == null) {
dv.noNulls = false;
dv.isNull[0] = true;
- dv.isRepeating = true;
} else {
- dv.fill(((HiveDecimal) value).longValue());
+ // fill serialized decimal value
+ dv.set(0, (HiveDecimal) value);
Review Comment:
there is no dv.fill() implementation in Decimal64ColumnVector. Either i can implement this in Decimal64ColumnVector or keep current changes. what do you suggest @deniskuzZ ?
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #5953:
URL: https://github.com/apache/hive/pull/5953#discussion_r2199708421
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java:
##########
@@ -574,10 +574,12 @@ public void addPartitionColsToBatch(ColumnVector col, Object value, int colIndex
if (value == null) {
dv.noNulls = false;
dv.isNull[0] = true;
- dv.isRepeating = true;
} else {
- dv.fill(((HiveDecimal) value).longValue());
+ // fill serialized decimal value
+ dv.set(0, (HiveDecimal) value);
Review Comment:
My bad, I missed that. Should we change herhttps://github.com/apache/hive/pull/5953/files#diff-2773a0f7ae920d36ecdaa185be6df7007e45ce9fb184f2b8754dbfc3038c00b1R590e as well?
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #5953:
URL: https://github.com/apache/hive/pull/5953#discussion_r2199708421
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java:
##########
@@ -574,10 +574,12 @@ public void addPartitionColsToBatch(ColumnVector col, Object value, int colIndex
if (value == null) {
dv.noNulls = false;
dv.isNull[0] = true;
- dv.isRepeating = true;
} else {
- dv.fill(((HiveDecimal) value).longValue());
+ // fill serialized decimal value
+ dv.set(0, (HiveDecimal) value);
Review Comment:
My bad, I missed that.
Should we change [here](https://github.com/apache/hive/pull/5953/files#diff-2773a0f7ae920d36ecdaa185be6df7007e45ce9fb184f2b8754dbfc3038c00b1R590) as well?
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #5953:
URL: https://github.com/apache/hive/pull/5953#discussion_r2200630003
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java:
##########
@@ -574,10 +574,12 @@ public void addPartitionColsToBatch(ColumnVector col, Object value, int colIndex
if (value == null) {
dv.noNulls = false;
dv.isNull[0] = true;
- dv.isRepeating = true;
} else {
- dv.fill(((HiveDecimal) value).longValue());
+ // fill serialized decimal value
+ dv.set(0, (HiveDecimal) value);
Review Comment:
ideally, we should replace the `fill(long value)` with
````
public void fill(HiveDecimal value) {
isRepeating = true;
isNull[0] = false;
if (vector[0] == null) {
vector[0] = new HiveDecimalWritable(value);
}
set(0, value);
}
````
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #5953:
URL: https://github.com/apache/hive/pull/5953#issuecomment-3063658363
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5953) **Quality Gate passed**
Issues
 [0 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5953&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5953&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=5953&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5953&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5953&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5953)
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #5953:
URL: https://github.com/apache/hive/pull/5953#discussion_r2199708421
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java:
##########
@@ -574,10 +574,12 @@ public void addPartitionColsToBatch(ColumnVector col, Object value, int colIndex
if (value == null) {
dv.noNulls = false;
dv.isNull[0] = true;
- dv.isRepeating = true;
} else {
- dv.fill(((HiveDecimal) value).longValue());
+ // fill serialized decimal value
+ dv.set(0, (HiveDecimal) value);
Review Comment:
My bad, I missed that. Why not just `dv.fill((HiveDecimal) value)`
Should we change [here](https://github.com/apache/hive/pull/5953/files#diff-2773a0f7ae920d36ecdaa185be6df7007e45ce9fb184f2b8754dbfc3038c00b1R590) as well?
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #5953:
URL: https://github.com/apache/hive/pull/5953#discussion_r2200630003
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java:
##########
@@ -574,10 +574,12 @@ public void addPartitionColsToBatch(ColumnVector col, Object value, int colIndex
if (value == null) {
dv.noNulls = false;
dv.isNull[0] = true;
- dv.isRepeating = true;
} else {
- dv.fill(((HiveDecimal) value).longValue());
+ // fill serialized decimal value
+ dv.set(0, (HiveDecimal) value);
Review Comment:
ideally, we should add
````
public void fill(HiveDecimal value) {
isRepeating = true;
isNull[0] = false;
if (vector[0] == null) {
vector[0] = new HiveDecimalWritable(value);
}
set(0, value);
}
````
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "Indhumathi27 (via GitHub)" <gi...@apache.org>.
Indhumathi27 commented on code in PR #5953:
URL: https://github.com/apache/hive/pull/5953#discussion_r2200684875
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java:
##########
@@ -574,10 +574,12 @@ public void addPartitionColsToBatch(ColumnVector col, Object value, int colIndex
if (value == null) {
dv.noNulls = false;
dv.isNull[0] = true;
- dv.isRepeating = true;
} else {
- dv.fill(((HiveDecimal) value).longValue());
+ // fill serialized decimal value
+ dv.set(0, (HiveDecimal) value);
Review Comment:
Decimal64ColumnVector will convert the value along with precision and scale to Long value and set it to vector.
Modified the code to fit this case.
below suggested code is not required.
` if (vector[0] == null) {
vector[0] = new HiveDecimalWritable(value);
}`
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #5953:
URL: https://github.com/apache/hive/pull/5953#discussion_r2200730933
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java:
##########
@@ -574,10 +574,12 @@ public void addPartitionColsToBatch(ColumnVector col, Object value, int colIndex
if (value == null) {
dv.noNulls = false;
dv.isNull[0] = true;
- dv.isRepeating = true;
} else {
- dv.fill(((HiveDecimal) value).longValue());
+ // fill serialized decimal value
+ dv.set(0, (HiveDecimal) value);
Review Comment:
@Indhumathi27 could you please drop the `fill(long value)` from Decimal64ColumnVector?
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #5953:
URL: https://github.com/apache/hive/pull/5953#issuecomment-3061679841
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5953) **Quality Gate passed**
Issues
 [14 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5953&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5953&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=5953&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5953&metric=new_coverage&view=list)
 [0.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5953&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5953)
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "zhangbutao (via GitHub)" <gi...@apache.org>.
zhangbutao merged PR #5953:
URL: https://github.com/apache/hive/pull/5953
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #5953:
URL: https://github.com/apache/hive/pull/5953#discussion_r2198909441
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java:
##########
@@ -574,10 +574,12 @@ public void addPartitionColsToBatch(ColumnVector col, Object value, int colIndex
if (value == null) {
dv.noNulls = false;
dv.isNull[0] = true;
- dv.isRepeating = true;
} else {
- dv.fill(((HiveDecimal) value).longValue());
+ // fill serialized decimal value
+ dv.set(0, (HiveDecimal) value);
Review Comment:
why do we hardcode with 0?
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "Indhumathi27 (via GitHub)" <gi...@apache.org>.
Indhumathi27 commented on code in PR #5953:
URL: https://github.com/apache/hive/pull/5953#discussion_r2199715389
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java:
##########
@@ -574,10 +574,12 @@ public void addPartitionColsToBatch(ColumnVector col, Object value, int colIndex
if (value == null) {
dv.noNulls = false;
dv.isNull[0] = true;
- dv.isRepeating = true;
} else {
- dv.fill(((HiveDecimal) value).longValue());
+ // fill serialized decimal value
+ dv.set(0, (HiveDecimal) value);
Review Comment:
For DecimalColumnVector it is using SET method internally. so the issue is only with Decimal64ColumnVector
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "Indhumathi27 (via GitHub)" <gi...@apache.org>.
Indhumathi27 commented on code in PR #5953:
URL: https://github.com/apache/hive/pull/5953#discussion_r2199551732
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java:
##########
@@ -574,10 +574,12 @@ public void addPartitionColsToBatch(ColumnVector col, Object value, int colIndex
if (value == null) {
dv.noNulls = false;
dv.isNull[0] = true;
- dv.isRepeating = true;
} else {
- dv.fill(((HiveDecimal) value).longValue());
+ // fill serialized decimal value
+ dv.set(0, (HiveDecimal) value);
Review Comment:
here, we are just filling partition vector value to 0th index. Before, dv.fill() method also sets the value to 0th index.
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "sonarqubecloud[bot] (via GitHub)" <gi...@apache.org>.
sonarqubecloud[bot] commented on PR #5953:
URL: https://github.com/apache/hive/pull/5953#issuecomment-3059887684
## [](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5953) **Quality Gate passed**
Issues
 [22 New issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5953&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0 Accepted issues](https://sonarcloud.io/project/issues?id=apache_hive&pullRequest=5953&issueStatuses=ACCEPTED)
Measures
 [0 Security Hotspots](https://sonarcloud.io/project/security_hotspots?id=apache_hive&pullRequest=5953&issueStatuses=OPEN,CONFIRMED&sinceLeakPeriod=true)
 [0.0% Coverage on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5953&metric=new_coverage&view=list)
 [1.0% Duplication on New Code](https://sonarcloud.io/component_measures?id=apache_hive&pullRequest=5953&metric=new_duplicated_lines_density&view=list)
[See analysis details on SonarQube Cloud](https://sonarcloud.io/dashboard?id=apache_hive&pullRequest=5953)
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #5953:
URL: https://github.com/apache/hive/pull/5953#discussion_r2200630003
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java:
##########
@@ -574,10 +574,12 @@ public void addPartitionColsToBatch(ColumnVector col, Object value, int colIndex
if (value == null) {
dv.noNulls = false;
dv.isNull[0] = true;
- dv.isRepeating = true;
} else {
- dv.fill(((HiveDecimal) value).longValue());
+ // fill serialized decimal value
+ dv.set(0, (HiveDecimal) value);
Review Comment:
ideally, we should add
````
public void fill(HiveDecimal value) {
isRepeating = true;
isNull[0] = false;
if (vector[0] == null) {
vector[0] = new HiveDecimalWritable(value);
}
set(0, value);
}
````
--
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
Re: [PR] HIVE-29080: Fix Incorrect results for queries on Decimal column Partitioned table with Vectorization enabled [hive]
Posted by "deniskuzZ (via GitHub)" <gi...@apache.org>.
deniskuzZ commented on code in PR #5953:
URL: https://github.com/apache/hive/pull/5953#discussion_r2200730933
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/VectorizedRowBatchCtx.java:
##########
@@ -574,10 +574,12 @@ public void addPartitionColsToBatch(ColumnVector col, Object value, int colIndex
if (value == null) {
dv.noNulls = false;
dv.isNull[0] = true;
- dv.isRepeating = true;
} else {
- dv.fill(((HiveDecimal) value).longValue());
+ // fill serialized decimal value
+ dv.set(0, (HiveDecimal) value);
Review Comment:
@Indhumathi27 could you please drop the `fill(long value)` from Decimal64ColumnVector?
--
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