Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive >> mail # user >> Both Left and Right Aliases Encountered in Join


Copy link to this message
-
Re: Both Left and Right Aliases Encountered in Join
Hi

AFAIK hive supports only equi joins. Can you check whether changing that <= to = , removes the semantic error?

You can give conditions other than equality in a where clause post join.

Regards
Bejoy KS

Sent from handheld, please excuse typos.

-----Original Message-----
From: Techy Teck <[EMAIL PROTECTED]>
Date: Fri, 20 Jul 2012 15:44:36
To: <[EMAIL PROTECTED]>
Reply-To: [EMAIL PROTECTED]
Subject: Both Left and Right Aliases Encountered in Join

I have a join query on which I am joining like this below. And it is
working fine

ON (table1.item = prod.product *AND* table1.buyer = prod.user *AND*
UNIX_TIMESTAMP(table1.tt_time)
= prod.timestamps)

But when I tried to modify the above same thing.
The thing that is in red color will work or not If I specify like this? As
when I was running my query having joining like this below.

ON (table1.item = prod.product *AND* table1.buyer = prod.user *AND*
*((UNIX_TIMESTAMP(table1.tt_time)
- (prod.timestamps)) / 60* 1000 <= 15)*)
I am getting error like this-

*FAILED: Error in semantic analysis: Both Left and Right Aliases
Encountered in Join 15*
*
*
*
*
So I guess there is some problem with number 15 at the end? Or we need to
cast something?