You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "slim bouguerra (JIRA)" <ji...@apache.org> on 2017/05/24 20:54:04 UTC
[jira] [Created] (CALCITE-1805) druid adaptere is using in a wrong
way count function
slim bouguerra created CALCITE-1805:
---------------------------------------
Summary: druid adaptere is using in a wrong way count function
Key: CALCITE-1805
URL: https://issues.apache.org/jira/browse/CALCITE-1805
Project: Calcite
Issue Type: Bug
Affects Versions: 1.12.0
Reporter: slim bouguerra
Currently queries like
{code}select count(column) from table{code} is pushed to druid as timeseries with an aggregator {code} {"type":"count","name":"EXPR$0","fieldName":"countryName"} {code}
Such an aggregator does not exists in druid. The count aggregator does only work as count(*).
here is a test case that summarize the issue.
{code} @Test public void testCount() {
final String sql = "SELECT count(\"countryName\") FROM (SELECT \"countryName\" FROM \"wikiticker\" WHERE \"countryName\" IS NOT NULL) as a";
sql(sql, WIKI_AUTO2).returnsUnordered("EXPR$0=3799");
final String sql2 = "SELECT count(\"countryName\") FROM (SELECT \"countryName\" FROM \"wikiticker\") as a";
sql(sql2, WIKI_AUTO2).returnsUnordered("EXPR$0=3799");
}{code} First test will pass while the second will not.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)