Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.6.0
-
None
Description
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 with a planing error.
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)