[ https://issues.apache.org/jira/browse/HIVE-23541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17128689#comment-17128689 ]
Hive QA commented on HIVE-23541: -------------------------------- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || || || || || {color:brown} Prechecks {color} || | {color:green}+1{color} | {color:green} @author {color} | {color:green} 0m 0s{color} | {color:green} The patch does not contain any @author tags. {color} | || || || || {color:brown} master Compile Tests {color} || | {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue} 0m 57s{color} | {color:blue} Maven dependency ordering for branch {color} | | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 9m 11s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 1s{color} | {color:green} master passed {color} | | {color:green}+1{color} | {color:green} checkstyle {color} | {color:green} 0m 55s{color} | {color:green} master passed {color} | | {color:blue}0{color} | {color:blue} findbugs {color} | {color:blue} 3m 47s{color} | {color:blue} ql in master has 1522 extant Findbugs warnings. {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 1m 5s{color} | {color:green} master passed {color} | || || || || {color:brown} Patch Compile Tests {color} || | {color:blue}0{color} | {color:blue} mvndep {color} | {color:blue} 0m 16s{color} | {color:blue} Maven dependency ordering for patch {color} | | {color:green}+1{color} | {color:green} mvninstall {color} | {color:green} 1m 28s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} compile {color} | {color:green} 1m 3s{color} | {color:green} the patch passed {color} | | {color:green}+1{color} | {color:green} javac {color} | {color:green} 1m 3s{color} | {color:green} the patch passed {color} | | {color:red}-1{color} | {color:red} checkstyle {color} | {color:red} 0m 56s{color} | {color:red} ql: The patch generated 22 new + 325 unchanged - 1 fixed = 347 total (was 326) {color} | | {color:green}+1{color} | {color:green} whitespace {color} | {color:green} 0m 0s{color} | {color:green} The patch has no whitespace issues. {color} | | {color:red}-1{color} | {color:red} findbugs {color} | {color:red} 4m 6s{color} | {color:red} ql generated 5 new + 1519 unchanged - 3 fixed = 1524 total (was 1522) {color} | | {color:green}+1{color} | {color:green} javadoc {color} | {color:green} 0m 58s{color} | {color:green} the patch passed {color} | || || || || {color:brown} Other Tests {color} || | {color:red}-1{color} | {color:red} asflicense {color} | {color:red} 0m 13s{color} | {color:red} The patch generated 1 ASF License warnings. {color} | | {color:black}{color} | {color:black} {color} | {color:black} 26m 36s{color} | {color:black} {color} | \\ \\ || Reason || Tests || | FindBugs | module:ql | | | org.apache.hadoop.hive.ql.exec.vector.ptf.VectorPTFGroupBatches.init(TypeInfo[], VectorPTFEvaluatorBase[], int[], TypeInfo[], int[], int[], int[], int[], VectorizedRowBatch) may expose internal representation by storing an externally mutable object into VectorPTFGroupBatches.evaluators At VectorPTFGroupBatches.java:int[], int[], int[], VectorizedRowBatch) may expose internal representation by storing an externally mutable object into VectorPTFGroupBatches.evaluators At VectorPTFGroupBatches.java:[line 95] | | | org.apache.hadoop.hive.ql.exec.vector.ptf.VectorPTFGroupBatches.init(TypeInfo[], VectorPTFEvaluatorBase[], int[], TypeInfo[], int[], int[], int[], int[], VectorizedRowBatch) may expose internal representation by storing an externally mutable object into VectorPTFGroupBatches.keyInputColumnMap At VectorPTFGroupBatches.java:int[], int[], int[], VectorizedRowBatch) may expose internal representation by storing an externally mutable object into VectorPTFGroupBatches.keyInputColumnMap At VectorPTFGroupBatches.java:[line 98] | | | org.apache.hadoop.hive.ql.exec.vector.ptf.VectorPTFGroupBatches.init(TypeInfo[], VectorPTFEvaluatorBase[], int[], TypeInfo[], int[], int[], int[], int[], VectorizedRowBatch) may expose internal representation by storing an externally mutable object into VectorPTFGroupBatches.outputProjectionColumnMap At VectorPTFGroupBatches.java:int[], int[], int[], VectorizedRowBatch) may expose internal representation by storing an externally mutable object into VectorPTFGroupBatches.outputProjectionColumnMap At VectorPTFGroupBatches.java:[line 96] | | | org.apache.hadoop.hive.ql.exec.vector.ptf.VectorPTFGroupBatches.init(TypeInfo[], VectorPTFEvaluatorBase[], int[], TypeInfo[], int[], int[], int[], int[], VectorizedRowBatch) may expose internal representation by storing an externally mutable object into VectorPTFGroupBatches.outputTypeInfos At VectorPTFGroupBatches.java:int[], int[], int[], VectorizedRowBatch) may expose internal representation by storing an externally mutable object into VectorPTFGroupBatches.outputTypeInfos At VectorPTFGroupBatches.java:[line 97] | | | Unread field:VectorPTFGroupBatches.java:[line 97] | \\ \\ || Subsystem || Report/Notes || | Optional Tests | asflicense javac javadoc findbugs checkstyle compile | | uname | Linux hiveptest-server-upstream 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u5 (2017-09-19) x86_64 GNU/Linux | | Build tool | maven | | Personality | /data/hiveptest/working/yetus_PreCommit-HIVE-Build-22787/dev-support/hive-personality.sh | | git revision | master / 2a3a42f | | Default Java | 1.8.0_111 | | findbugs | v3.0.1 | | checkstyle | http://104.198.109.242/logs//PreCommit-HIVE-Build-22787/yetus/diff-checkstyle-ql.txt | | findbugs | http://104.198.109.242/logs//PreCommit-HIVE-Build-22787/yetus/new-findbugs-ql.html | | asflicense | http://104.198.109.242/logs//PreCommit-HIVE-Build-22787/yetus/patch-asflicense-problems.txt | | modules | C: ql itests U: . | | Console output | http://104.198.109.242/logs//PreCommit-HIVE-Build-22787/yetus.txt | | Powered by | Apache Yetus http://yetus.apache.org | This message was automatically generated. > Vectorization: Unbounded following window function start producing results > too early > ------------------------------------------------------------------------------------ > > Key: HIVE-23541 > URL: https://issues.apache.org/jira/browse/HIVE-23541 > Project: Hive > Issue Type: Bug > Components: PTF-Windowing, Vectorization > Affects Versions: 4.0.0, 3.1.2 > Reporter: Gopal Vijayaraghavan > Assignee: Ramesh Kumar Thangarajan > Priority: Major > Attachments: HIVE-23541.1.patch > > > ReduceRecordSource indicates the end of group for a reducer input, whenever > the entire key changes. > ReduceRecordSource::processVectorGroup calls > reducer.setNextVectorBatchGroupStatus(/* isLastGroupBatch */ true); when the > last group is being processed. > However for PTF window functions with unbounded following, this is triggered > by the key changing and not the partition changing. > This results in the VectorPTFOperator detect a change in the sort key as a > switch of the partition key and start producing results too early. > https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/exec/vector/ptf/VectorPTFOperator.java#L399 > {code} > create temporary table test2(id STRING,name STRING,event_dt date) stored as > orc; > insert into test2 values ('100','A','2019-08-15'), ('100','A','2019-10-12'); > SELECT name, event_dt, first_value(event_dt) over (PARTITION BY name ORDER BY > event_dt desc ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT_ROW) last_event_dt > FROM test2; -- streaming FIRST_VALUE with DESCENDING > SELECT name, event_dt, last_value(event_dt) over (PARTITION BY name ORDER BY > event_dt asc ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING ) > last_event_dt FROM test2; -- non-streaming LAST_VALUE with ASCENDING > {code} > These two queries should return identical results, with the streaming version > being significantly faster than the non-streaming one, due to the lack of > buffered/spilled rows with streaming. -- This message was sent by Atlassian Jira (v8.3.4#803005)