phoenix-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ciureanu, Constantin (GfK)" <Constantin.Ciure...@gfk.com>
Subject RE: Inner Join not returning any results in Phoenix
Date Fri, 20 Feb 2015 14:39:42 GMT
Hi Matthew,

Is it working without the quotes “ / "  ?   (I see you are using 2 types of quotes, weird)
I guess that’s not needed, and probably causing troubles.   I don’t have to use quotes
anyway.

Alternatively check the types of data in those 2 tables (if the field types are not the same
in both tables, the join will not work).

Good luck,
  Constantin

From: Matthew Johnson [mailto:matt.johnson@algomi.com]
Sent: Friday, February 20, 2015 12:54 PM
To: user@phoenix.apache.org
Subject: Inner Join not returning any results in Phoenix

Hi guys,

I’m a little bit stuck with doing an Inner Join with Phoenix. I set up one environment,
created tables in HBase, and then created views (rather than tables) in Phoenix, and am able
to query as expected (when I join my two tables I see results). I’ve just promoted to another
environment, with the exact same setup, but my Inner Join returns no results!

I run the following two individual queries:

SELECT * FROM "mytable1" hc
where hc."myId" = 'XS0'

SELECT * FROM "mytable2" bs
where bs."myId" = 'XS0'

And both of these queries give results. But when I run:

SELECT * FROM "mytable1" hc
INNER JOIN “mytable2” bs
On hc."myId" = bs.”myId”

I get no results. I also get no results if I try:

SELECT * FROM "mytable1" hc
where hc."myId" in (select distinct “myId” from “mytable2”)

I have checked in HBase shell and can see the “myId” value is as expected (XS0 in both
tables). I am not sure if there are any logs that I can look at to get some insight?

Many thanks in advance for any suggestions!

Cheers,
Matt

PS Something that may or may not be of note: In the environments I am using:
WORKING: hbase-0.98.8-hadoop2 / phoenix-4.2.2-server.jar
FAILING:     hbase-0.98.9-hadoop2 / phoenix-4.2.2-server.jar
Mime
View raw message