You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Vitaliy Fuks (Jira)" <ji...@apache.org> on 2020/10/15 21:44:00 UTC
[jira] [Updated] (HIVE-24050) ParseException in query with
subqueries
[ https://issues.apache.org/jira/browse/HIVE-24050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vitaliy Fuks updated HIVE-24050:
--------------------------------
Fix Version/s: (was: 2.3.7)
> ParseException in query with subqueries
> ---------------------------------------
>
> Key: HIVE-24050
> URL: https://issues.apache.org/jira/browse/HIVE-24050
> Project: Hive
> Issue Type: Bug
> Components: Hive
> Affects Versions: 3.1.2, 2.3.7
> Environment: Hadoop-3.0.0
> Hive-2.3.7, Hive-3.1.2
> Reporter: Ruslan Krylov
> Assignee: Eugene Koifman
> Priority: Major
>
> h2.
> The query which runs in hive 2.1 fails in hive 2.3 with ParseException. Hive-3.1.2 also has this issue.
> *STEPS TO REPRODUCE:*
> {code:java}
> 1. Create tables:
> CREATE TABLE IF NOT EXISTS t1 (id INT, c1 INT);
> CREATE TABLE IF NOT EXISTS t2 (id INT, c2 INT);
> 2. Run the query:
> SELECT * FROM
> ((SELECT c1 FROM t1) AS X)
> JOIN
> ((SELECT c2 FROM t2) AS Y)
> ON
> X.c1 = Y.c2;
> {code}
> *ACTUAL RESULT:*
> The query fails with an exception you can find below.
> {code:java}
> hive> CREATE TABLE IF NOT EXISTS t1 (id INT, c1 INT);
> OK
> Time taken: 0.348 seconds
> hive> CREATE TABLE IF NOT EXISTS t2 (id INT, c2 INT);
> OK
> Time taken: 0.186 seconds
> hive> SELECT * FROM
> >
> > ((SELECT c1 FROM t1) AS X)
> >
> > JOIN
> >
> > ((SELECT c2 FROM t2) AS Y)
> >
> > ON
> >
> > X.c1 = Y.c2;
> FAILED: ParseException line 7:21 missing ) at 'AS' near 'Y'
> line 7:25 missing EOF at ')' near 'Y'{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)