You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@hive.apache.org by "maswin (via GitHub)" <gi...@apache.org> on 2023/05/22 19:41:31 UTC
[GitHub] [hive] maswin commented on a diff in pull request #3492: HIVE-26447: Vectorization: wrong results when filter on repeating map key orc table
maswin commented on code in PR #3492:
URL: https://github.com/apache/hive/pull/3492#discussion_r1200967679
##########
ql/src/java/org/apache/hadoop/hive/ql/exec/vector/expressions/VectorUDFMapIndexStringScalar.java:
##########
@@ -66,10 +66,13 @@ public int findScalarInMap(MapColumnVector mapColumnVector, int mapBatchIndex) {
byte[][] keyVector = keyColVector.vector;
int[] keyStart = keyColVector.start;
int[] keyLength = keyColVector.length;
+ final boolean isRepeating = keyColVector.isRepeating;
for (int i = 0; i < count; i++) {
final int keyOffset = offset + i;
+ final int len = isRepeating? keyLength[0]: keyLength[keyOffset];
+ byte[] rowKey = isRepeating? keyVector[0]: keyVector[keyOffset];
if (StringExpr.equal(key, 0, key.length,
- keyVector[keyOffset], keyStart[keyOffset], keyLength[keyOffset])) {
+ rowKey, keyStart[keyOffset], len)) {
Review Comment:
keyStart[keyOffset] should also be assigned based on isRepeating key.
--
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