[
https://issues.apache.org/jira/browse/DRILL-3294?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14596985#comment-14596985
]
Jinfeng Ni commented on DRILL-3294:
-----------------------------------
Seems you may uploaded the same file as in DRILL-3293, which only has 3 rows.
Anyway, with the uploaded t1_parquet file, I can run the CTAS statement
successfully:
{code}
create table wf_t1(a1) as select avg(a1) over(partition by a1) from
dfs.`/tmp/t1.parquet`;
+-----------+----------------------------+
| Fragment | Number of records written |
+-----------+----------------------------+
| 0_0 | 3 |
+-----------+----------------------------+
1 row selected (0.301 seconds)
0: jdbc:drill:zk=local> select * from wf_t1;
+-------+
| a1 |
+-------+
| 1.0 |
| 2.0 |
| null |
+-------+
3 rows selected (0.112 seconds)
{code}
I'm going to mark this as fixed. Please re-open if you see the issue is still
there. thanks.
> False schema change exception in CTAS with AVG window function
> --------------------------------------------------------------
>
> Key: DRILL-3294
> URL: https://issues.apache.org/jira/browse/DRILL-3294
> Project: Apache Drill
> Issue Type: Bug
> Components: Query Planning & Optimization
> Affects Versions: 1.0.0
> Reporter: Victoria Markman
> Assignee: Jinfeng Ni
> Labels: window_function
> Fix For: 1.1.0
>
> Attachments: t1_parquet
>
>
> This bug could be related to DRILL-3293, but since it's a different function
> and different symptom, I'm filing a new one.
> {code}
> 0: jdbc:drill:schema=dfs> create table wf_t1(a1) as select avg(a1)
> over(partition by a1) from t1;
> Error: SYSTEM ERROR: org.apache.drill.exec.exception.SchemaChangeException:
> Failure while trying to materialize incoming schema. Errors:
>
> Error in expression at index -1. Error: Missing function implementation:
> [castTINYINT(NULL-OPTIONAL)]. Full expression: --UNKNOWN EXPRESSION--..
> Fragment 0:0
> [Error Id: 1ca5af3a-0ea7-4b75-b493-74f6404d4894 on atsqa4-133.qa.lab:31010]
> (state=,code=0)
> {code}
> Query works correctly by itself:
> {code}
> 0: jdbc:drill:schema=dfs> select avg(a1) over(partition by a1) from t1;
> +---------+
> | EXPR$0 |
> +---------+
> | 1 |
> | 2 |
> | 3 |
> | 4 |
> | 5 |
> | 6 |
> | 7 |
> | 9 |
> | 10 |
> | null |
> +---------+
> 10 rows selected (0.181 seconds)
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)