drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Deneche A. Hakim (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (DRILL-3605) Wrong results - Lead(char-column)
Date Wed, 05 Aug 2015 15:39:04 GMT

     [ https://issues.apache.org/jira/browse/DRILL-3605?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Deneche A. Hakim resolved DRILL-3605.
-------------------------------------
    Resolution: Fixed

Fixed in private branch

> Wrong results - Lead(char-column) 
> ----------------------------------
>
>                 Key: DRILL-3605
>                 URL: https://issues.apache.org/jira/browse/DRILL-3605
>             Project: Apache Drill
>          Issue Type: Bug
>          Components: Execution - Flow
>    Affects Versions: 1.2.0
>         Environment: private-branch-with-new-window-functions
>            Reporter: Khurram Faraaz
>            Assignee: Deneche A. Hakim
>              Labels: window_function
>             Fix For: 1.2.0
>
>         Attachments: fewRowsAllData.parquet
>
>
> col2 is of type char(2) in the parquet file.
> Results returned by Drill
> {code}
> 0: jdbc:drill:schema=dfs.tmp> select col2, lead(col2) over (partition by col2 order
by col0) lead_col0 from `fewRowsAllData.parquet`;
> +------+-----------+
> | col2 | lead_col0 |
> +------+-----------+
> | AK | null |
> | AZ | AZCACO |
> | AZ | null |
> | CA | null |
> | CO | COCODEGAGAGA |
> | CO | CODEGAGAGAGAHI |
> | CO | null |
> | DE | null |
> | GA | GAGAGAHIIAIAIAIAININ |
> | GA | GAGAHIIAIAIAIAININININ |
> | GA | GAHIIAIAIAIAININININKSLA |
> | GA | null |
> | HI | null |
> | IA | IAIAIAININININKSLAMAMAMAMDMDME |
> | IA | IAIAININININKSLAMAMAMAMDMDMEMEMI |
> | IA | IAININININKSLAMAMAMAMDMDMEMEMIMNMN |
> | IA | null |
> | IN | INININKSLAMAMAMAMDMDMEMEMIMNMNMNMNMNMN |
> | IN | ININKSLAMAMAMAMDMDMEMEMIMNMNMNMNMNMNMOMO |
> | IN | INKSLAMAMAMAMDMDMEMEMIMNMNMNMNMNMNMOMOMONC |
> | IN | null |
> | KS | null |
> | LA | null |
> | MA | MAMAMDMDMEMEMIMNMNMNMNMNMNMOMOMONCNDNDNENHNHNHNYNY |
> | MA | MAMDMDMEMEMIMNMNMNMNMNMNMOMOMONCNDNDNENHNHNHNYNYNYOH |
> | MA | null |
> | MD | MDMEMEMIMNMNMNMNMNMNMOMOMONCNDNDNENHNHNHNYNYNYOHOHORORPA |
> | MD | null |
> | ME | MEMIMNMNMNMNMNMNMOMOMONCNDNDNENHNHNHNYNYNYOHOHORORPARIRIRIRI |
> | ME | null |
> | MI | null |
> | MN | MNMNMNMNMNMOMOMONCNDNDNENHNHNHNYNYNYOHOHORORPARIRIRIRISCSCSDSDSDUT |
> | MN | MNMNMNMNMOMOMONCNDNDNENHNHNHNYNYNYOHOHORORPARIRIRIRISCSCSDSDSDUTUTUT |
> | MN | MNMNMNMOMOMONCNDNDNENHNHNHNYNYNYOHOHORORPARIRIRIRISCSCSDSDSDUTUTUTVTVT |
> | MN | MNMNMOMOMONCNDNDNENHNHNHNYNYNYOHOHORORPARIRIRIRISCSCSDSDSDUTUTUTVTVTVTVT |
> | MN | MNMOMOMONCNDNDNENHNHNHNYNYNYOHOHORORPARIRIRIRISCSCSDSDSDUTUTUTVTVTVTVTWIWI |
> | MN | null |
> | MO | MOMONCNDNDNENHNHNHNYNYNYOHOHORORPARIRIRIRISCSCSDSDSDUTUTUTVTVTVTVTWIWIWVWYWYWY
|
> | MO | MONCNDNDNENHNHNHNYNYNYOHOHORORPARIRIRIRISCSCSDSDSDUTUTUTVTVTVTVTWIWIWVWYWYWYWY
|
> | MO | null |
> | NC | null |
> | ND | NDNENHNHNHNYNYNYOHOHORORPARIRIRIRISCSCSDSDSDUTUTUTVTVTVTVTWIWIWVWYWYWYWY |
> | ND | null |
> | NE | null |
> | NH | NHNHNYNYNYOHOHORORPARIRIRIRISCSCSDSDSDUTUTUTVTVTVTVTWIWIWVWYWYWYWY |
> | NH | NHNYNYNYOHOHORORPARIRIRIRISCSCSDSDSDUTUTUTVTVTVTVTWIWIWVWYWYWYWY |
> | NH | null |
> | NY | NYNYOHOHORORPARIRIRIRISCSCSDSDSDUTUTUTVTVTVTVTWIWIWVWYWYWYWY |
> | NY | NYOHOHORORPARIRIRIRISCSCSDSDSDUTUTUTVTVTVTVTWIWIWVWYWYWYWY |
> | NY | null |
> | OH | OHORORPARIRIRIRISCSCSDSDSDUTUTUTVTVTVTVTWIWIWVWYWYWYWY |
> | OH | null |
> | OR | ORPARIRIRIRISCSCSDSDSDUTUTUTVTVTVTVTWIWIWVWYWYWYWY |
> | OR | null |
> | PA | null |
> | RI | RIRIRISCSCSDSDSDUTUTUTVTVTVTVTWIWIWVWYWYWYWY |
> | RI | RIRISCSCSDSDSDUTUTUTVTVTVTVTWIWIWVWYWYWYWY |
> | RI | RISCSCSDSDSDUTUTUTVTVTVTVTWIWIWVWYWYWYWY |
> | RI | null |
> | SC | SCSDSDSDUTUTUTVTVTVTVTWIWIWVWYWYWYWY |
> | SC | null |
> | SD | SDSDUTUTUTVTVTVTVTWIWIWVWYWYWYWY |
> | SD | SDUTUTUTVTVTVTVTWIWIWVWYWYWYWY |
> | SD | null |
> | UT | UTUTVTVTVTVTWIWIWVWYWYWYWY |
> | UT | UTVTVTVTVTWIWIWVWYWYWYWY |
> | UT | null |
> | VT | VTVTVTWIWIWVWYWYWYWY |
> | VT | VTVTWIWIWVWYWYWYWY |
> | VT | VTWIWIWVWYWYWYWY |
> | VT | null |
> | WI | WIWVWYWYWYWY |
> | WI | null |
> | WV | null |
> | WY | WYWYWY |
> | WY | WYWY |
> | WY | WY |
> | WY | null |
> +------+-----------+
> 78 rows selected (0.307 seconds)
> {code}
> Results returned by Postgres.
> {code}
> postgres=# select col2,lead(col2) over (partition by col2 order by col0) lead_col0 from
tbl_alldata;
>  col2 | lead_col0 
> ------+-----------
>  AK   | 
>  AZ   | AZ
>  AZ   | 
>  CA   | 
>  CO   | CO
>  CO   | CO
>  CO   | 
>  DE   | 
>  GA   | GA
>  GA   | GA
>  GA   | GA
>  GA   | 
>  HI   | 
>  IA   | IA
>  IA   | IA
>  IA   | IA
>  IA   | 
>  IN   | IN
>  IN   | IN
>  IN   | IN
>  IN   | 
>  KS   | 
>  LA   | 
>  MA   | MA
>  MA   | MA
>  MA   | 
>  MD   | MD
>  MD   | 
>  ME   | ME
>  ME   | 
>  MI   | 
>  MN   | MN
>  MN   | MN
>  MN   | MN
>  MN   | MN
>  MN   | MN
>  MN   | 
>  MO   | MO
>  MO   | MO
>  MO   | 
>  NC   | 
>  ND   | ND
>  ND   | 
>  NE   | 
>  NH   | NH
>  NH   | NH
>  NH   | 
>  NY   | NY
>  NY   | NY
>  NY   | 
>  OH   | OH
>  OH   | 
>  OR   | OR
>  OR   | 
>  PA   | 
>  RI   | RI
>  RI   | RI
>  RI   | RI
>  RI   | 
>  SC   | SC
>  SC   | 
>  SD   | SD
>  SD   | SD
>  SD   | 
>  UT   | UT
>  UT   | UT
>  UT   | 
>  VT   | VT
>  VT   | VT
>  VT   | VT
>  VT   | 
>  WI   | WI
>  WI   | 
>  WV   | 
>  WY   | WY
>  WY   | WY
>  WY   | WY
>  WY   | 
> (78 rows)
> {code}



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

Mime
View raw message