[ https://issues.apache.org/jira/browse/HIVE-23665?focusedWorklogId=454943&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-454943 ]
ASF GitHub Bot logged work on HIVE-23665: ----------------------------------------- Author: ASF GitHub Bot Created on: 06/Jul/20 16:40 Start Date: 06/Jul/20 16:40 Worklog Time Spent: 10m Work Description: ramesh0201 commented on a change in pull request #1177: URL: https://github.com/apache/hive/pull/1177#discussion_r450347761 ########## File path: ql/src/test/results/clientpositive/llap/vector_ptf_part_simple.q.out ########## @@ -314,46 +386,46 @@ POSTHOOK: type: QUERY POSTHOOK: Input: default@vector_ptf_part_simple_orc #### A masked pattern was here #### p_mfgr p_name p_retailprice rn r dr fv lv c cs -Manufacturer#2 almond aquamarine rose maroon antique 900.66 1 1 1 900.66 2031.98 8 8 -Manufacturer#2 almond aquamarine rose maroon antique 1698.66 2 1 1 900.66 2031.98 8 8 -Manufacturer#2 almond antique violet turquoise frosted 1800.7 3 1 1 900.66 2031.98 8 8 -Manufacturer#2 almond antique violet chocolate turquoise 1690.68 4 1 1 900.66 2031.98 8 8 -Manufacturer#2 almond antique violet turquoise frosted 1800.7 5 1 1 900.66 2031.98 8 8 -Manufacturer#2 almond antique violet turquoise frosted 1800.7 6 1 1 900.66 2031.98 8 8 -Manufacturer#2 almond aquamarine sandy cyan gainsboro 1000.6 7 1 1 900.66 2031.98 8 8 -Manufacturer#2 almond aquamarine midnight light salmon 2031.98 8 1 1 900.66 2031.98 8 8 Manufacturer#3 almond antique forest lavender goldenrod 1190.27 1 1 1 1190.27 1190.27 7 8 -Manufacturer#3 almond antique chartreuse khaki white 99.68 2 1 1 1190.27 1190.27 7 8 -Manufacturer#3 almond antique forest lavender goldenrod NULL 3 1 1 1190.27 1190.27 7 8 -Manufacturer#3 almond antique metallic orange dim 55.39 4 1 1 1190.27 1190.27 7 8 -Manufacturer#3 almond antique misty red olive 1922.98 5 1 1 1190.27 1190.27 7 8 -Manufacturer#3 almond antique forest lavender goldenrod 590.27 6 1 1 1190.27 1190.27 7 8 -Manufacturer#3 almond antique olive coral navajo 1337.29 7 1 1 1190.27 1190.27 7 8 Manufacturer#3 almond antique forest lavender goldenrod 1190.27 8 1 1 1190.27 1190.27 7 8 -Manufacturer#4 almond antique gainsboro frosted violet NULL 1 1 1 NULL 1290.35 4 6 -Manufacturer#4 almond aquamarine floral ivory bisque NULL 2 1 1 NULL 1290.35 4 6 -Manufacturer#4 almond antique violet mint lemon 1375.42 3 1 1 NULL 1290.35 4 6 -Manufacturer#4 almond aquamarine yellow dodger mint 1844.92 4 1 1 NULL 1290.35 4 6 -Manufacturer#4 almond aquamarine floral ivory bisque 1206.26 5 1 1 NULL 1290.35 4 6 -Manufacturer#4 almond azure aquamarine papaya violet 1290.35 6 1 1 NULL 1290.35 4 6 +Manufacturer#3 almond antique olive coral navajo 1337.29 7 1 1 1190.27 1190.27 7 8 +Manufacturer#3 almond antique forest lavender goldenrod 590.27 6 1 1 1190.27 1190.27 7 8 +Manufacturer#3 almond antique misty red olive 1922.98 5 1 1 1190.27 1190.27 7 8 +Manufacturer#3 almond antique metallic orange dim 55.39 4 1 1 1190.27 1190.27 7 8 +Manufacturer#3 almond antique forest lavender goldenrod NULL 3 1 1 1190.27 1190.27 7 8 +Manufacturer#3 almond antique chartreuse khaki white 99.68 2 1 1 1190.27 1190.27 7 8 +Manufacturer#1 almond aquamarine pink moccasin thistle 1632.66 1 1 1 1632.66 1632.66 11 12 +Manufacturer#1 almond antique chartreuse lavender yellow 1753.76 2 1 1 1632.66 1632.66 11 12 +Manufacturer#1 almond aquamarine pink moccasin thistle 1632.66 3 1 1 1632.66 1632.66 11 12 +Manufacturer#1 almond antique chartreuse lavender yellow 1753.76 4 1 1 1632.66 1632.66 11 12 +Manufacturer#1 almond aquamarine pink moccasin thistle 1632.66 5 1 1 1632.66 1632.66 11 12 +Manufacturer#1 almond antique chartreuse lavender yellow 1753.76 6 1 1 1632.66 1632.66 11 12 +Manufacturer#1 almond antique salmon chartreuse burlywood 1602.59 7 1 1 1632.66 1632.66 11 12 +Manufacturer#1 almond antique burnished rose metallic 1173.15 8 1 1 1632.66 1632.66 11 12 +Manufacturer#1 almond aquamarine burnished black steel 1414.42 9 1 1 1632.66 1632.66 11 12 +Manufacturer#1 almond aquamarine pink moccasin thistle NULL 10 1 1 1632.66 1632.66 11 12 +Manufacturer#1 almond antique chartreuse lavender yellow 1753.76 11 1 1 1632.66 1632.66 11 12 +Manufacturer#1 almond antique burnished rose metallic 1173.15 12 1 1 1632.66 1632.66 11 12 +Manufacturer#5 almond antique blue firebrick mint 1789.69 6 1 1 1611.66 1789.69 6 6 Manufacturer#5 almond antique medium spring khaki 1611.66 1 1 1 1611.66 1789.69 6 6 Manufacturer#5 almond aquamarine dodger light gainsboro 1018.1 2 1 1 1611.66 1789.69 6 6 Manufacturer#5 almond azure blanched chiffon midnight 1464.48 3 1 1 1611.66 1789.69 6 6 Manufacturer#5 almond antique medium spring khaki 1611.66 4 1 1 1611.66 1789.69 6 6 Manufacturer#5 almond antique sky peru orange 1788.73 5 1 1 1611.66 1789.69 6 6 -Manufacturer#5 almond antique blue firebrick mint 1789.69 6 1 1 1611.66 1789.69 6 6 -Manufacturer#1 almond aquamarine pink moccasin thistle 1632.66 1 1 1 1632.66 1173.15 11 12 -Manufacturer#1 almond antique chartreuse lavender yellow 1753.76 2 1 1 1632.66 1173.15 11 12 -Manufacturer#1 almond aquamarine pink moccasin thistle 1632.66 3 1 1 1632.66 1173.15 11 12 -Manufacturer#1 almond antique chartreuse lavender yellow 1753.76 4 1 1 1632.66 1173.15 11 12 -Manufacturer#1 almond aquamarine pink moccasin thistle 1632.66 5 1 1 1632.66 1173.15 11 12 -Manufacturer#1 almond antique chartreuse lavender yellow 1753.76 6 1 1 1632.66 1173.15 11 12 -Manufacturer#1 almond antique salmon chartreuse burlywood 1602.59 7 1 1 1632.66 1173.15 11 12 -Manufacturer#1 almond antique burnished rose metallic 1173.15 8 1 1 1632.66 1173.15 11 12 -Manufacturer#1 almond aquamarine burnished black steel 1414.42 9 1 1 1632.66 1173.15 11 12 -Manufacturer#1 almond aquamarine pink moccasin thistle NULL 10 1 1 1632.66 1173.15 11 12 -Manufacturer#1 almond antique chartreuse lavender yellow 1753.76 11 1 1 1632.66 1173.15 11 12 -Manufacturer#1 almond antique burnished rose metallic 1173.15 12 1 1 1632.66 1173.15 11 12 +Manufacturer#4 almond aquamarine floral ivory bisque 1206.26 5 1 1 NULL 1206.26 4 6 +Manufacturer#4 almond azure aquamarine papaya violet 1290.35 6 1 1 NULL 1206.26 4 6 +Manufacturer#4 almond antique gainsboro frosted violet NULL 1 1 1 NULL 1206.26 4 6 +Manufacturer#4 almond aquamarine floral ivory bisque NULL 2 1 1 NULL 1206.26 4 6 +Manufacturer#4 almond antique violet mint lemon 1375.42 3 1 1 NULL 1206.26 4 6 +Manufacturer#4 almond aquamarine yellow dodger mint 1844.92 4 1 1 NULL 1206.26 4 6 +Manufacturer#2 almond antique violet turquoise frosted 1800.7 3 1 1 900.66 1800.7 8 8 Review comment: Yes, I still do not understand why the results are changing. But last value column expression looks like last_value(p_retailprice) over(partition by p_mfgr) as lv, which is without an order by clause. Because of which we have now changed the order of processing the rows and the result is also changed. I spent some time understanding the spec and how other databases behave when we do not have an order by clause. The spec does not say anything and also each database behave in a different way in these circumstances. Do you think it is ok for me to update the keys for this q file? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 454943) Time Spent: 1h (was: 50m) > Rewrite last_value to first_value to enable streaming results > ------------------------------------------------------------- > > Key: HIVE-23665 > URL: https://issues.apache.org/jira/browse/HIVE-23665 > Project: Hive > Issue Type: Bug > Reporter: Ramesh Kumar Thangarajan > Assignee: Ramesh Kumar Thangarajan > Priority: Major > Labels: pull-request-available > Attachments: HIVE-23665.1.patch, HIVE-23665.2.patch, > HIVE-23665.3.patch > > Time Spent: 1h > Remaining Estimate: 0h > > Rewrite last_value to first_value to enable streaming results > last_value cannot be streamed because the intermediate results need to be > buffered to determine the window result till we get the last row in the > window. But if we can rewrite to first_value we can stream the results, > although the order of results will not be guaranteed (also not important) -- This message was sent by Atlassian Jira (v8.3.4#803005)