Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 02B5F200CC9 for ; Mon, 3 Jul 2017 06:32:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0106E160BFE; Mon, 3 Jul 2017 04:32:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 47234160BEE for ; Mon, 3 Jul 2017 06:32:07 +0200 (CEST) Received: (qmail 47317 invoked by uid 500); 3 Jul 2017 04:32:05 -0000 Mailing-List: contact issues-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 issues@hive.apache.org Received: (qmail 46873 invoked by uid 99); 3 Jul 2017 04:32:05 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Jul 2017 04:32:05 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 1B687C0D5B for ; Mon, 3 Jul 2017 04:32:05 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -99.202 X-Spam-Level: X-Spam-Status: No, score=-99.202 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id 0Lg69zjFlF35 for ; Mon, 3 Jul 2017 04:32:04 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id 998035F613 for ; Mon, 3 Jul 2017 04:32:03 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 40E24E0D39 for ; Mon, 3 Jul 2017 04:32:02 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 28287245E4 for ; Mon, 3 Jul 2017 04:32:00 +0000 (UTC) Date: Mon, 3 Jul 2017 04:32:00 +0000 (UTC) From: "Sahil Takiar (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (HIVE-16935) Hive should strip comments from input before choosing which CommandProcessor to run. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Mon, 03 Jul 2017 04:32:08 -0000 [ https://issues.apache.org/jira/browse/HIVE-16935?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1607= 1909#comment-16071909 ]=20 Sahil Takiar commented on HIVE-16935: ------------------------------------- [~spena] could you help review this patch? Peter and I have already provide= d some comments on the RB: https://reviews.apache.org/r/60445/ > Hive should strip comments from input before choosing which CommandProces= sor to run. > -------------------------------------------------------------------------= ----------- > > Key: HIVE-16935 > URL: https://issues.apache.org/jira/browse/HIVE-16935 > Project: Hive > Issue Type: Bug > Reporter: Andrew Sherman > Assignee: Andrew Sherman > Attachments: HIVE-16935.1.patch, HIVE-16935.2.patch, HIVE-16935.3= .patch > > > While using Beeswax, Hue fails to execute statement with following error: > Error while compiling statement: FAILED: ParseException line 3:4 missing = KW_ROLE at 'a' near 'a' line 3:5 missing EOF at '=3D' near 'a' > {quote} > -- comment > SET a=3D1; > SELECT 1; > {quote} > The same code works in Beeline and in Impala. > The same code fails in CliDriver=20 > =20 > h2. Background > Hive deals with sql comments (=E2=80=9C-- to end of line=E2=80=9D) in dif= ferent places. > Some clients attempt to strip comments. For example BeeLine was recently = enhanced in https://issues.apache.org/jira/browse/HIVE-13864 to strip comme= nts from multi-line commands before they are executed. > Other clients such as Hue or Jdbc do not strip comments before sending te= xt. > Some tests such as TestCliDriver strip comments before running tests. > When Hive gets a command the CommandProcessorFactory looks at the text to= determine which CommandProcessor should handle the command. In the bug cas= e the correct CommandProcessor is SetProcessor, but the comments confuse th= e CommandProcessorFactory and so the command is treated as sql. Hive=E2=80= =99s sql parser understands and ignores comments, but it does not understan= d the set commands usually handled by SetProcessor and so we get the ParseE= xception shown above. > =20 -- This message was sent by Atlassian JIRA (v6.4.14#64029)