hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eugene Koifman (Jira)" <j...@apache.org>
Subject [jira] [Assigned] (HIVE-24050) ParseException in query with subqueries
Date Wed, 28 Jul 2021 14:10:00 GMT

     [ https://issues.apache.org/jira/browse/HIVE-24050?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Eugene Koifman reassigned HIVE-24050:
-------------------------------------

    Assignee:     (was: Eugene Koifman)

> 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: 2.3.7, 3.1.2
>         Environment: Hadoop-3.0.0
> Hive-2.3.7, Hive-3.1.2
>            Reporter: Ruslan Krylov
>            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)

Mime
View raw message