[
https://issues.apache.org/jira/browse/DRILL-3277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14592591#comment-14592591
]
Deneche A. Hakim commented on DRILL-3277:
-----------------------------------------
Thanks to [~amansinha100] suggestion I tried the same queries on a parquet file
with the following metadata:
{noformat}
file schema: root
col_int: OPTIONAL INT32 R:0 D:1
col_char: OPTIONAL BINARY O:UTF8 R:0 D:1
{noformat}
The sum is now properly computed on a BIGINT column:
{noformat}
SELECT SUM(col_int) OVER(PARTITION BY col_char) FROM dfs.tmp.`3277` LIMIT 1;
+--------------+
| EXPR$0 |
+--------------+
| -3216087191 |
+--------------+
{noformat}
> SUM(CAST(columns[0] AS INT)) OVER(...) gives wrong results
> ----------------------------------------------------------
>
> Key: DRILL-3277
> URL: https://issues.apache.org/jira/browse/DRILL-3277
> Project: Apache Drill
> Issue Type: Sub-task
> Components: Execution - Flow
> Reporter: Deneche A. Hakim
> Assignee: Deneche A. Hakim
> Labels: window_function
> Fix For: 1.1.0
>
> Attachments: 3277.parquet, onecol-sm.csv
>
>
> The following query return wrong results, there is a difference in actual vs
> expected results. Expected results were generated on Postgres 9.3
> {noformat}
> SELECT
> SUM(cast( columns[0] as INT ))
> OVER(PARTITION BY cast( columns[2] as CHAR(2)))
> FROM `allData.csv`;
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)