You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Again, I don't know if this is an issue of the specific version of Hive (2.1.1-cdh6.2.1) or a general one.
The default translation of unions puts the two SELECT statements on both sides of UNION into parantheses.
This is no problem in Impala, but in Hive I get a syntax error about an unexpected string near UNION (.
(SELECT*FROM`df`WHERE (`group`='a'))
UNION ALL
(SELECT*FROM`df`WHERE (`group`='b'))
I tried a similar simple query with an actual database in HUE and the parantheses seemed to have caused the issue. At least without them it worked.
The ideal translation would be thus:
SELECT*FROM`df`WHERE (`group`='a')
UNION ALLSELECT*FROM`df`WHERE (`group`='b')
In my real-life application the query is much more complex and dbplyr works with naming intermediate queries q01 et cetera. This is fine, but also the outer ones, i.e. the two sides of the UNION ALL are named like this via placing the SELECT queries in parentheses and this should be avoided.
Looking forward to hearing your views/experiences and possible fixes!
Best,
Alex
The text was updated successfully, but these errors were encountered:
Hi there,
Again, I don't know if this is an issue of the specific version of Hive (2.1.1-cdh6.2.1) or a general one.
The default translation of unions puts the two
SELECT
statements on both sides ofUNION
into parantheses.This is no problem in Impala, but in Hive I get a syntax error about an unexpected string near UNION
(
.The query generated will be
I tried a similar simple query with an actual database in HUE and the parantheses seemed to have caused the issue. At least without them it worked.
The ideal translation would be thus:
In my real-life application the query is much more complex and dbplyr works with naming intermediate queries
q01
et cetera. This is fine, but also the outer ones, i.e. the two sides of the UNION ALL are named like this via placing the SELECT queries in parentheses and this should be avoided.Looking forward to hearing your views/experiences and possible fixes!
Best,
Alex
The text was updated successfully, but these errors were encountered: