drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Khurram Faraaz (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DRILL-3606) Wrong results - Lead(char-column) without PARTITION BY clause
Date Tue, 01 Sep 2015 23:03:45 GMT

    [ https://issues.apache.org/jira/browse/DRILL-3606?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14726383#comment-14726383
] 

Khurram Faraaz commented on DRILL-3606:
---------------------------------------

Verified on master with commit_id 445790fe

{code}
0: jdbc:drill:schema=dfs.tmp> select lead(col2) over (order by col0) lead_col0 from `fewRowsAllData.parquet`;
+------------+
| lead_col0  |
+------------+
| NH         |
| IN         |
| CA         |
| CO         |
| SC         |
| SD         |
| WY         |
| LA         |
| KS         |
| CO         |
| NY         |
| NY         |
...
| WI         |
| VT         |
| RI         |
| SC         |
| ME         |
| null       |
+------------+
78 rows selected (0.627 seconds)
{code}

> Wrong results - Lead(char-column) without PARTITION BY clause
> -------------------------------------------------------------
>
>                 Key: DRILL-3606
>                 URL: https://issues.apache.org/jira/browse/DRILL-3606
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Flow
>    Affects Versions: 1.2.0
>         Environment: private branch: https://github.com/adeneche/incubator-drill/tree/new-window-funcs
>            Reporter: Khurram Faraaz
>            Assignee: Deneche A. Hakim
>              Labels: window_function
>             Fix For: 1.2.0
>
>
> Window function query that does not use partition by clause in window definition and
uses LEAD function returns wrong results, on developer's private branch. This issue may be
related to DRILL-3605
> Results returned by Drill
> {code}
> 0: jdbc:drill:schema=dfs.tmp> select lead(col2) over (order by col0) lead_col0 from
`fewRowsAllData.parquet`;
> +-----------+
> | lead_col0 |
> +-----------+
> | NHIN |
> | INCACO |
> | CACOSCSD |
> | COSCSDWYLA |
> | SCSDWYLAKSCO |
> | SDWYLAKSCONYNY |
> | WYLAKSCONYNYSDGA |
> | LAKSCONYNYSDGAMOIN |
> | KSCONYNYSDGAMOINMNIA |
> | CONYNYSDGAMOINMNIAGAMN |
> | NYNYSDGAMOINMNIAGAMNMNMI |
> | NYSDGAMOINMNIAGAMNMNMIRISD |
> | SDGAMOINMNIAGAMNMNMIRISDINWI |
> | GAMOINMNIAGAMNMNMIRISDINWIMAIA |
> | MOINMNIAGAMNMNMIRISDINWIMAIANDMA |
> | INMNIAGAMNMNMIRISDINWIMAIANDMARIME |
> | MNIAGAMNMNMIRISDINWIMAIANDMARIMEMNCO |
> | IAGAMNMNMIRISDINWIMAIANDMARIMEMNCOOHMO |
> | GAMNMNMIRISDINWIMAIANDMARIMEMNCOOHMOGAVT |
> | MNMNMIRISDINWIMAIANDMARIMEMNCOOHMOGAVTNDNH |
> | MNMIRISDINWIMAIANDMARIMEMNCOOHMOGAVTNDNHRIOR |
> | MIRISDINWIMAIANDMARIMEMNCOOHMOGAVTNDNHRIORNCAZ |
> | RISDINWIMAIANDMARIMEMNCOOHMOGAVTNDNHRIORNCAZORMD |
> | SDINWIMAIANDMARIMEMNCOOHMOGAVTNDNHRIORNCAZORMDHIMA |
> | INWIMAIANDMARIMEMNCOOHMOGAVTNDNHRIORNCAZORMDHIMANYUT |
> | WIMAIANDMARIMEMNCOOHMOGAVTNDNHRIORNCAZORMDHIMANYUTDEWY |
> | MAIANDMARIMEMNCOOHMOGAVTNDNHRIORNCAZORMDHIMANYUTDEWYOHWY |
> | IANDMARIMEMNCOOHMOGAVTNDNHRIORNCAZORMDHIMANYUTDEWYOHWYNHAK |
> | NDMARIMEMNCOOHMOGAVTNDNHRIORNCAZORMDHIMANYUTDEWYOHWYNHAKMDPA |
> | MARIMEMNCOOHMOGAVTNDNHRIORNCAZORMDHIMANYUTDEWYOHWYNHAKMDPAMNGA |
> | RIMEMNCOOHMOGAVTNDNHRIORNCAZORMDHIMANYUTDEWYOHWYNHAKMDPAMNGAMOVT |
> | MEMNCOOHMOGAVTNDNHRIORNCAZORMDHIMANYUTDEWYOHWYNHAKMDPAMNGAMOVTUTIN |
> | MNCOOHMOGAVTNDNHRIORNCAZORMDHIMANYUTDEWYOHWYNHAKMDPAMNGAMOVTUTINWYWV |
> | COOHMOGAVTNDNHRIORNCAZORMDHIMANYUTDEWYOHWYNHAKMDPAMNGAMOVTUTINWYWVIAMN |
> | OHMOGAVTNDNHRIORNCAZORMDHIMANYUTDEWYOHWYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVT |
> | MOGAVTNDNHRIORNCAZORMDHIMANYUTDEWYOHWYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUT |
> | GAVTNDNHRIORNCAZORMDHIMANYUTDEWYOHWYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVT |
> | VTNDNHRIORNCAZORMDHIMANYUTDEWYOHWYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISC |
> | NDNHRIORNCAZORMDHIMANYUTDEWYOHWYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | NHRIORNCAZORMDHIMANYUTDEWYOHWYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | RIORNCAZORMDHIMANYUTDEWYOHWYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | ORNCAZORMDHIMANYUTDEWYOHWYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | NCAZORMDHIMANYUTDEWYOHWYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | AZORMDHIMANYUTDEWYOHWYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | ORMDHIMANYUTDEWYOHWYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | MDHIMANYUTDEWYOHWYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | HIMANYUTDEWYOHWYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | MANYUTDEWYOHWYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | NYUTDEWYOHWYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | UTDEWYOHWYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | DEWYOHWYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | WYOHWYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | OHWYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | WYNHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | NHAKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | AKMDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | MDPAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | PAMNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | MNGAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | GAMOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | MOVTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | VTUTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | UTINWYWVIAMNAZVTIAUTWIVTRISCME |
> | INWYWVIAMNAZVTIAUTWIVTRISCME |
> | WYWVIAMNAZVTIAUTWIVTRISCME |
> | WVIAMNAZVTIAUTWIVTRISCME |
> | IAMNAZVTIAUTWIVTRISCME |
> | MNAZVTIAUTWIVTRISCME |
> | AZVTIAUTWIVTRISCME |
> | VTIAUTWIVTRISCME |
> | IAUTWIVTRISCME |
> | UTWIVTRISCME |
> | WIVTRISCME |
> | VTRISCME |
> | RISCME |
> | SCME |
> | ME |
> | null |
> +-----------+
> 78 rows selected (0.301 seconds)
> {code}
> Results returned by Postgres
> {code}
> postgres=# select lead(col2) over (order by col0) lead_col0 from tbl_alldata;
>  lead_col0 
> -----------
>  NH
>  IN
>  CA
>  CO
>  SC
>  SD
>  WY
>  LA
>  KS
>  CO
>  NY
>  NY
>  SD
>  GA
>  MO
>  IN
>  MN
>  IA
>  GA
>  MN
>  MN
>  MI
>  RI
>  SD
>  IN
>  WI
>  MA
>  IA
>  ND
>  MA
>  RI
>  ME
>  MN
>  CO
>  OH
>  MO
>  GA
>  VT
>  NH
>  ND
>  RI
>  OR
>  NC
>  AZ
>  OR
>  MD
>  HI
>  MA
>  NY
>  UT
>  DE
>  WY
>  OH
>  WY
>  NH
>  AK
>  MD
>  PA
>  MN
>  GA
>  MO
>  VT
>  UT
>  IN
>  WY
>  WV
>  IA
>  MN
>  AZ
>  VT
>  IA
>  UT
>  WI
>  VT
>  RI
>  SC
>  ME
>  
> (78 rows)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message