Ok Team.. So it's a bug , please find below jira link:- https://issues.apache.org/jira/browse/DRILL-4474 On 04-Mar-2016 11:23 PM, "Anup Tiwari" <[email protected]> wrote:
> Hi Team, > > I am getting different output for same condition in drill.. In 1st query I > have counted sessions in select clause directly with my desired conditions( > t.id = '/confirm/btnYes/' and t.event = 'Click')and in 2nd one counting > same along with another column.. > Please find below 2 queries with output:- > > 0: jdbc:drill:> select > . . . . . . . > count(case when t.id = '/confirm/btnYes/' and t.event = > 'Click' then sessionid end) as cnt > . . . . . . . > from dfs.tmp.tt1 t > . . . . . . . > ; > +-----------+ > | count | > +-----------+ > | 27645752 | > +-----------+ > 1 row selected (0.281 seconds) > 0: jdbc:drill:> select > . . . . . . . > count(distinct sessionid), > . . . . . . . > count(case when t.id = '/confirm/btnYes/' and t.event = > 'Click' then sessionid end) as cnt > . . . . . . . > from dfs.tmp.tt1 t > . . . . . . . > ; > +---------+-----------+ > | EXPR$0 | cnt | > +---------+-----------+ > | 201941 | 37772844 | > +---------+-----------+ > 1 row selected (8.259 seconds) > > Kindly let me know if I am Missing anything. > > > Regards, > > Anup >
