Vitalii Diravka created DRILL-6291:
--------------------------------------

             Summary: Wrong result for COUNT function and empty file 
(schemaless table)
                 Key: DRILL-6291
                 URL: https://issues.apache.org/jira/browse/DRILL-6291
             Project: Apache Drill
          Issue Type: Bug
          Components: Functions - Drill
    Affects Versions: 1.13.0
            Reporter: Vitalii Diravka
             Fix For: Future


The count function shouldn't return null result. For the 0 rows case it should 
always return 0.
{code}
0: jdbc:drill:zk=local> select count(`last_name`) from 
dfs.`/tmp/empty_file.json`;
+---------+
| EXPR$0  |
+---------+
+---------+
No rows selected (0.3 seconds)
{code}
The result should be the similar to:
{code}
0: jdbc:drill:zk=local> select count(`non_existent_column`) from 
cp.`employee.json`;
+---------+
| EXPR$0  |
+---------+
| 0       |
+---------+
1 row selected (0.274 seconds)
{code}

Note: empty_file.json is an empty file.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to