You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by kr...@apache.org on 2022/06/17 10:58:40 UTC
[hive] branch master updated: HIVE-26340: Vectorized PTF operator fails if query has upper case window function (Krisztian Kasa, reviewed by Laszlo Bodor)
This is an automated email from the ASF dual-hosted git repository.
krisztiankasa 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 01b8fcffcb3 HIVE-26340: Vectorized PTF operator fails if query has upper case window function (Krisztian Kasa, reviewed by Laszlo Bodor)
01b8fcffcb3 is described below
commit 01b8fcffcb31cc128e71350d1b25c98b50ee85e5
Author: Krisztian Kasa <kk...@cloudera.com>
AuthorDate: Fri Jun 17 12:58:29 2022 +0200
HIVE-26340: Vectorized PTF operator fails if query has upper case window function (Krisztian Kasa, reviewed by Laszlo Bodor)
---
.../apache/hadoop/hive/ql/plan/VectorPTFDesc.java | 2 +-
ql/src/test/queries/clientpositive/vector_ptf_1.q | 4 +-
.../results/clientpositive/llap/vector_ptf_1.q.out | 115 ++++++++++++++++++++-
3 files changed, 117 insertions(+), 4 deletions(-)
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/plan/VectorPTFDesc.java b/ql/src/java/org/apache/hadoop/hive/ql/plan/VectorPTFDesc.java
index 696c5206964..b8c7fb51356 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/plan/VectorPTFDesc.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/plan/VectorPTFDesc.java
@@ -431,7 +431,7 @@ public class VectorPTFDesc extends AbstractVectorDesc {
VectorPTFEvaluatorBase[] evaluators = new VectorPTFEvaluatorBase[evaluatorCount];
for (int i = 0; i < evaluatorCount; i++) {
- String functionName = evaluatorFunctionNames[i];
+ String functionName = evaluatorFunctionNames[i].toLowerCase();
boolean isDistinct = evaluatorsAreDistinct[i];
WindowFrameDef windowFrameDef = evaluatorWindowFrameDefs[i];
SupportedFunctionType functionType = VectorPTFDesc.supportedFunctionsMap.get(functionName);
diff --git a/ql/src/test/queries/clientpositive/vector_ptf_1.q b/ql/src/test/queries/clientpositive/vector_ptf_1.q
index 578cfbdf9f4..75d905f0d73 100644
--- a/ql/src/test/queries/clientpositive/vector_ptf_1.q
+++ b/ql/src/test/queries/clientpositive/vector_ptf_1.q
@@ -22,4 +22,6 @@ select age, name, avg(gpa), sum(age) over (partition by name)
from studentnull100
group by age, name;
-EXPLAIN VECTORIZATION ONLY SELECT ROW_NUMBER() OVER(order by age) AS rn FROM studentnull100;
+EXPLAIN VECTORIZATION ONLY
+SELECT ROW_NUMBER() OVER(order by age) AS rn FROM studentnull100;
+SELECT ROW_NUMBER() OVER(order by age) AS rn FROM studentnull100;
diff --git a/ql/src/test/results/clientpositive/llap/vector_ptf_1.q.out b/ql/src/test/results/clientpositive/llap/vector_ptf_1.q.out
index ed28e50b2cb..7aed406d383 100644
--- a/ql/src/test/results/clientpositive/llap/vector_ptf_1.q.out
+++ b/ql/src/test/results/clientpositive/llap/vector_ptf_1.q.out
@@ -296,11 +296,13 @@ NULL sarah ovid 1.62 NULL
26 yuri robinson 1.22 26
69 yuri zipper NULL 69
56 zach robinson 0.86 56
-PREHOOK: query: EXPLAIN VECTORIZATION ONLY SELECT ROW_NUMBER() OVER(order by age) AS rn FROM studentnull100
+PREHOOK: query: EXPLAIN VECTORIZATION ONLY
+SELECT ROW_NUMBER() OVER(order by age) AS rn FROM studentnull100
PREHOOK: type: QUERY
PREHOOK: Input: default@studentnull100
#### A masked pattern was here ####
-POSTHOOK: query: EXPLAIN VECTORIZATION ONLY SELECT ROW_NUMBER() OVER(order by age) AS rn FROM studentnull100
+POSTHOOK: query: EXPLAIN VECTORIZATION ONLY
+SELECT ROW_NUMBER() OVER(order by age) AS rn FROM studentnull100
POSTHOOK: type: QUERY
POSTHOOK: Input: default@studentnull100
#### A masked pattern was here ####
@@ -343,3 +345,112 @@ STAGE PLANS:
Stage: Stage-0
Fetch Operator
+PREHOOK: query: SELECT ROW_NUMBER() OVER(order by age) AS rn FROM studentnull100
+PREHOOK: type: QUERY
+PREHOOK: Input: default@studentnull100
+#### A masked pattern was here ####
+POSTHOOK: query: SELECT ROW_NUMBER() OVER(order by age) AS rn FROM studentnull100
+POSTHOOK: type: QUERY
+POSTHOOK: Input: default@studentnull100
+#### A masked pattern was here ####
+rn
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+66
+67
+68
+69
+70
+71
+72
+73
+74
+75
+76
+77
+78
+79
+80
+81
+82
+83
+84
+85
+86
+87
+88
+89
+90
+91
+92
+93
+94
+95
+96
+97
+98
+99
+100