Tableau is using the following query to get the distinct count of a measure:

SELECT COUNT(DISTINCT `custview`.`age`) AS `ctd_age_ok` FROM
`mfs.views`.`nestedclickview` `nestedclickview` INNER JOIN
`mfs.views`.`custview` `custview` ON (`nestedclickview`.`cust_id` =
`custview`.`cust_id`) HAVING (COUNT(1) > 0);

And it fails on 0.06r2.

Interestingly if I remove the HAVING(COUNT(1)>0) statement at the end it
works:

: jdbc:drill:zk=172.16.1.175:5181,172.16.1.1> SELECT COUNT(DISTINCT
`custview`.`age`) AS `ctd_age_ok` FROM `mfs.views`.`nestedclickview`
`nestedclickview` INNER JOIN `mfs.views`.`custview` `custview` ON
(`nestedclickview`.`cust_id` = `custview`.`cust_id`);

+------------+
| ctd_age_ok |
+------------+
| 5          |
+------------+
1 row selected (4.776 seconds)

Is this a bug, or a malformed query from Tableau?

See the error log attached for more detail.

Chris Matta
[email protected]
215-701-3146
​

Reply via email to