Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created on 12-07-2016 10:41 PM - edited 09-16-2022 03:50 AM
The error
The query
Created 12-13-2016 08:52 PM
Hi,
I can see the images now, but not sure why they did not show up before. I can see that you are trying to run a query that contains:
(rel.i_prtitn,rel.i_mod_yr) in (select * from my_prtitn)
I would like you know that this is currently not supported, please refer to Hive's Apache documentation below:
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+SubQueries
It mentions the following:
If you want to acheive the same goal, you will need to use JOIN with subQuery on those two columns.
Hope this helps.
Regards
Eric
Created 12-08-2016 02:45 AM
Do I miss anything? I don't see what are in the two pictures..
Created 12-08-2016 04:25 AM
Hi Eric,
The last line of the query
where (rel.i_prtitn,rel.i_mod_yr) in (select * from my_prtitn) and rtrim(substr(rel.c_lu_1,3,2)) > ' ';
has the two columns "rel.i_prtitn" and "rel.i_mod_yr" in the where clause for which the error is thrown.
Thanks,
Saransh
Created on 12-11-2016 10:46 PM - edited 12-11-2016 11:10 PM
I guess this is a limitation of HIVE it can select only a single column for IN subqueries.
An Alternative to this can be:
where rel.i_prtitn in (select * from my_prtitn) and rel.i_mod_yr in (select * from my_prtitn) and rtrim(substr(rel.c_lu_1,3,2)) > ' ';
But it won't be an optimized solution. Please reply if you think otherwise.
Created 12-13-2016 08:52 PM
Hi,
I can see the images now, but not sure why they did not show up before. I can see that you are trying to run a query that contains:
(rel.i_prtitn,rel.i_mod_yr) in (select * from my_prtitn)
I would like you know that this is currently not supported, please refer to Hive's Apache documentation below:
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+SubQueries
It mentions the following:
If you want to acheive the same goal, you will need to use JOIN with subQuery on those two columns.
Hope this helps.
Regards
Eric