Return-Path: X-Original-To: apmail-hive-dev-archive@www.apache.org Delivered-To: apmail-hive-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id DBBAB10934 for ; Tue, 25 Nov 2014 10:23:13 +0000 (UTC) Received: (qmail 33123 invoked by uid 500); 25 Nov 2014 10:23:12 -0000 Delivered-To: apmail-hive-dev-archive@hive.apache.org Received: (qmail 33053 invoked by uid 500); 25 Nov 2014 10:23:12 -0000 Mailing-List: contact dev-help@hive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@hive.apache.org Delivered-To: mailing list dev@hive.apache.org Received: (qmail 33042 invoked by uid 500); 25 Nov 2014 10:23:12 -0000 Delivered-To: apmail-hadoop-hive-dev@hadoop.apache.org Received: (qmail 33039 invoked by uid 99); 25 Nov 2014 10:23:12 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Nov 2014 10:23:12 +0000 Date: Tue, 25 Nov 2014 10:23:12 +0000 (UTC) From: =?utf-8?Q?R=C3=A9my_SAISSY_=28JIRA=29?= To: hive-dev@hadoop.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-8960) ParsingException in the WHERE statement with a Sub Query MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/HIVE-8960?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:all-tabpanel ] R=C3=A9my SAISSY updated HIVE-8960: ------------------------------ Description:=20 Comparison with a Sub query in a WHERE statement does not work. Given that id_chargement is an integer: USE db1; SELECT * FROM tbl1 a WHERE a.id_chargement > (SELECT MAX(b.id_chargement) F= ROM tbl2 b); or SELECT * FROM tbl1 a WHERE a.id_chargement > (SELECT b.id_chargement FROM t= bl2 b LIMIT 1); Both return the following parsing error: Error: Error while compiling statement: FAILED: ParseException line 1:88 ca= nnot recognize input near 'SELECT' 'b' '.' in expression specification (sta= te=3D42000,code=3D40000) java.sql.SQLException: Error while compiling statement: FAILED: ParseExcept= ion line 1:88 cannot recognize input near 'SELECT' 'b' '.' in expression sp= ecification at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:121) at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:109) at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:23= 1) at org.apache.hive.beeline.Commands.execute(Commands.java:736) at org.apache.hive.beeline.Commands.sql(Commands.java:657) at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:804) at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:659) at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine= .java:368) at org.apache.hive.beeline.BeeLine.main(BeeLine.java:351) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessor= Impl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethod= AccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.hadoop.util.RunJar.main(RunJar.java:212) was: Comparison with a Sub query in a WHERE statement does not work. Given that id_chargement is an integer: USE db1; SELECT * FROM tbl1 a WHERE a.id_chargement > (SELECT b.id_chargement FROM t= bl2 b); Returns the following parsing error: Error: Error while compiling statement: FAILED: ParseException line 1:88 ca= nnot recognize input near 'SELECT' 'b' '.' in expression specification (sta= te=3D42000,code=3D40000) java.sql.SQLException: Error while compiling statement: FAILED: ParseExcept= ion line 1:88 cannot recognize input near 'SELECT' 'b' '.' in expression sp= ecification at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:121) at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:109) at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:23= 1) at org.apache.hive.beeline.Commands.execute(Commands.java:736) at org.apache.hive.beeline.Commands.sql(Commands.java:657) at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:804) at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:659) at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLine= .java:368) at org.apache.hive.beeline.BeeLine.main(BeeLine.java:351) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessor= Impl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethod= AccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at org.apache.hadoop.util.RunJar.main(RunJar.java:212) > ParsingException in the WHERE statement with a Sub Query > -------------------------------------------------------- > > Key: HIVE-8960 > URL: https://issues.apache.org/jira/browse/HIVE-8960 > Project: Hive > Issue Type: Bug > Components: Parser > Affects Versions: 0.13.0 > Environment: Secured HDP 2.1.3 with Hive 0.13.0 > Reporter: R=C3=A9my SAISSY > > Comparison with a Sub query in a WHERE statement does not work. > Given that id_chargement is an integer: > USE db1; > SELECT * FROM tbl1 a WHERE a.id_chargement > (SELECT MAX(b.id_chargement)= FROM tbl2 b); > or > SELECT * FROM tbl1 a WHERE a.id_chargement > (SELECT b.id_chargement FROM= tbl2 b LIMIT 1); > Both return the following parsing error: > Error: Error while compiling statement: FAILED: ParseException line 1:88 = cannot recognize input near 'SELECT' 'b' '.' in expression specification (s= tate=3D42000,code=3D40000) > java.sql.SQLException: Error while compiling statement: FAILED: ParseExce= ption line 1:88 cannot recognize input near 'SELECT' 'b' '.' in expression = specification > at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:121) > at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:10= 9) > at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:= 231) > at org.apache.hive.beeline.Commands.execute(Commands.java:736) > at org.apache.hive.beeline.Commands.sql(Commands.java:657) > at org.apache.hive.beeline.BeeLine.dispatch(BeeLine.java:804) > at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:659) > at org.apache.hive.beeline.BeeLine.mainWithInputRedirection(BeeLi= ne.java:368) > at org.apache.hive.beeline.BeeLine.main(BeeLine.java:351) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess= orImpl.java:57) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth= odAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:601) > at org.apache.hadoop.util.RunJar.main(RunJar.java:212) -- This message was sent by Atlassian JIRA (v6.3.4#6332)