drill-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victoria Markman (JIRA)" <j...@apache.org>
Subject [jira] [Created] (DRILL-3653) Assert in a query with both avg aggregate and avg window aggregate functions
Date Fri, 14 Aug 2015 23:57:45 GMT
Victoria Markman created DRILL-3653:
---------------------------------------

             Summary: Assert in a query with both avg aggregate and avg window aggregate functions
                 Key: DRILL-3653
                 URL: https://issues.apache.org/jira/browse/DRILL-3653
             Project: Apache Drill
          Issue Type: Improvement
          Components: Query Planning & Optimization
    Affects Versions: 1.2.0
            Reporter: Victoria Markman
            Assignee: Jinfeng Ni


It seems to be the problem with just this combination and I can't believe I did not find it
earlier ...

{code}
0: jdbc:drill:schema=dfs> select avg(a1), avg(a1) over () from t1 group by a1;
Error: SYSTEM ERROR: AssertionError: Internal error: invariant violated: conversion result
not null
[Error Id: 2f850005-a7f6-4215-bbc1-90da57cbb71f on atsqa4-133.qa.lab:31010] (state=,code=0)
{code}

Works:
{code}
0: jdbc:drill:schema=dfs> select avg(a1), sum(a1) over () from t1 group by a1;
+---------+---------+
| EXPR$0  | EXPR$1  |
+---------+---------+
| 1.0     | 47      |
| 2.0     | 47      |
| 3.0     | 47      |
| 4.0     | 47      |
| 5.0     | 47      |
| 6.0     | 47      |
| 7.0     | 47      |
| 9.0     | 47      |
| 10.0    | 47      |
| null    | 47      |
+---------+---------+
10 rows selected (0.54 seconds)
{code}

{code}
0: jdbc:drill:schema=dfs> select avg(a1), count(a1) over () from t1 group by a1;
+---------+---------+
| EXPR$0  | EXPR$1  |
+---------+---------+
| 1.0     | 9       |
| 2.0     | 9       |
| 3.0     | 9       |
| 4.0     | 9       |
| 5.0     | 9       |
| 6.0     | 9       |
| 7.0     | 9       |
| 9.0     | 9       |
| 10.0    | 9       |
| null    | 9       |
+---------+---------+
10 rows selected (0.304 seconds)
{code}

{code}
0: jdbc:drill:schema=dfs> select avg(a1), count(a1) over (), sum(a1) over(partition by
b1) from t1 group by a1, b1;
+---------+---------+---------+
| EXPR$0  | EXPR$1  | EXPR$2  |
+---------+---------+---------+
| 1.0     | 9       | 1       |
| 2.0     | 9       | 2       |
| 3.0     | 9       | 3       |
| 5.0     | 9       | 5       |
| 6.0     | 9       | 6       |
| 7.0     | 9       | 7       |
| null    | 9       | null    |
| 9.0     | 9       | 9       |
| 10.0    | 9       | 10      |
| 4.0     | 9       | 4       |
+---------+---------+---------+
10 rows selected (0.788 seconds)
{code}




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

Mime
View raw message