You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Khurram Faraaz (JIRA)" <ji...@apache.org> on 2015/11/10 20:53:11 UTC
[jira] [Created] (DRILL-4061) Incorrect results returned by window
function query.
Khurram Faraaz created DRILL-4061:
-------------------------------------
Summary: Incorrect results returned by window function query.
Key: DRILL-4061
URL: https://issues.apache.org/jira/browse/DRILL-4061
Project: Apache Drill
Issue Type: Bug
Components: Execution - Flow
Affects Versions: 1.3.0
Environment: 4 node cluster CentOS
Reporter: Khurram Faraaz
Window function query that uses lag function returns incorrect results.
sys.version => 3a73f098
Drill 1.3
Test parquet file is attached here.
{code}
0: jdbc:drill:schema=dfs.tmp> CREATE TABLE testrepro AS SELECT CAST(columns[0] AS INT) col0, CAST(columns[1] AS INT) col1 FROM `testRepro.csv`;
+-----------+----------------------------+
| Fragment | Number of records written |
+-----------+----------------------------+
| 0_0 | 11 |
+-----------+----------------------------+
1 row selected (0.542 seconds)
0: jdbc:drill:schema=dfs.tmp> select col1, 1 / (col1 - lag(col1) OVER (ORDER BY col0)) from testrepro;
+-------+---------+
| col1 | EXPR$1 |
+-------+---------+
| 11 | null |
| 9 | 0 |
| 0 | 0 |
| 10 | 0 |
| 19 | 0 |
| 13 | 0 |
| 17 | 0 |
| -1 | 0 |
| 1 | 0 |
| 20 | 0 |
| 100 | 0 |
+-------+---------+
11 rows selected (0.451 seconds)
{code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)