Hi Everyone,

Are there any known bugs on Left joins in Phoenix

Here are the two queries with same conditions resulting different set of
records.

 0: jdbc:phoenix:172.31.45.176:2181:/hbase> select count(*) from
. . . . . . . . . . . . . . . . . . . . .> (select rowkey, "typeid" as
typeid, to_number("duration") as duration, "issoftphoneinit" as
issoftphoneinit, "callsid" as callsid, "dbname" as dbname, "agentid" as
agentid
. . . . . . . . . . . . . . . . . . . . .> from "leaddialerleglog"
. . . . . . . . . . . . . . . . . . . . .> where "logdate" >= '2015-01-01'
 and "logdate" <=  '2015-05-01'
. . . . . . . . . . . . . . . . . . . . .> and "dbname" ='lmguaranteedrate'
. . . . . . . . . . . . . . . . . . . . .> and rowkey like
'lmguaranteedrate%'
. . . . . . . . . . . . . . . . . . . . .> ) ldll
. . . . . . . . . . . . . . . . . . . . .> left outer join
"inboundnumbercalllog" cl on ldll.callsid = cl."callsid"
. . . . . . . . . . . . . . . . . . . . .> where  cl."dbname"
='lmguaranteedrate';

+------------------------------------------+
|                 COUNT(1)                 |
+------------------------------------------+
| 28896                                    |
+------------------------------------------+
1 row selected (26.949 seconds)

0: jdbc:phoenix:172.31.45.176:2181:/hbase> select count(*) from
. . . . . . . . . . . . . . . . . . . . .> (select rowkey, "typeid" as
typeid, to_number("duration") as duration, "issoftphoneinit" as
issoftphoneinit, "callsid" as callsid, "dbname" as dbname, "agentid" as
agentid
. . . . . . . . . . . . . . . . . . . . .> from "leaddialerleglog"
. . . . . . . . . . . . . . . . . . . . .> where "logdate" >= '2015-01-01'
 and "logdate" <=  '2015-05-01'
. . . . . . . . . . . . . . . . . . . . .> and "dbname" ='lmguaranteedrate'
. . . . . . . . . . . . . . . . . . . . .> and rowkey like
'lmguaranteedrate%'
. . . . . . . . . . . . . . . . . . . . .> ) ldll
. . . . . . . . . . . . . . . . . . . . .> left outer join
"inboundnumbercalllog" cl on (ldll.callsid = cl."callsid" and cl."dbname"
='lmguaranteedrate' );
+------------------------------------------+
|                 COUNT(1)                 |
+------------------------------------------+
| 426461                                   |
+------------------------------------------+
1 row selected (27.205 seconds)

Expected result is 426461.

Thanks,
Siva.

Reply via email to