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 642BC200C38 for ; Wed, 1 Mar 2017 02:55:50 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 62D0E160B7C; Wed, 1 Mar 2017 01:55:50 +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 AC6D7160B81 for ; Wed, 1 Mar 2017 02:55:49 +0100 (CET) Received: (qmail 35895 invoked by uid 500); 1 Mar 2017 01:55:48 -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 35885 invoked by uid 99); 1 Mar 2017 01:55:48 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Mar 2017 01:55:48 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 74B70C6B57 for ; Wed, 1 Mar 2017 01:55:48 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.451 X-Spam-Level: * X-Spam-Status: No, score=1.451 tagged_above=-999 required=6.31 tests=[KAM_ASCII_DIVIDERS=0.8, RP_MATCHES_RCVD=-0.001, SPF_NEUTRAL=0.652] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id EMLnJCUYuYav for ; Wed, 1 Mar 2017 01:55:47 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 9CB9E60DC0 for ; Wed, 1 Mar 2017 01:55:47 +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 98525E0A12 for ; Wed, 1 Mar 2017 01:55:46 +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 A732424176 for ; Wed, 1 Mar 2017 01:55:45 +0000 (UTC) Date: Wed, 1 Mar 2017 01:55:45 +0000 (UTC) From: "Vihang Karajgaonkar (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Assigned] (HIVE-15822) beeline ignore all sql under comment after semicolon MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 01 Mar 2017 01:55:50 -0000 [ https://issues.apache.org/jira/browse/HIVE-15822?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Vihang Karajgaonkar reassigned HIVE-15822: ------------------------------------------ Assignee: muxin (was: Vihang Karajgaonkar) > beeline ignore all sql under comment after semicolon > ---------------------------------------------------- > > Key: HIVE-15822 > URL: https://issues.apache.org/jira/browse/HIVE-15822 > Project: Hive > Issue Type: Bug > Components: Beeline, HiveServer2 > Affects Versions: 1.2.1, 2.1.1 > Reporter: muxin > Assignee: muxin > Attachments: HIVE-15822.patch > > > way to reproduce this error: > beeline -u jdbc:hive2://localhost:10000 -n test -e " > show databases;--some comment here > show tables;" > it will only execute 'show databases', and consider > '--some comment here > show tables;' > as comment( all sql under the first comment appeared after semicolon). > when the comment is also end with semicolon, the result will be right. > the root cause is that beeline will only consider a entire command is inputed when a line is end with semicolon, otherwise if this line is not started with '--' or '#' beeline will combine it with next line until meet semicolon in the end. so actually the comment above is not removed(which causes the error). then beeline split the entire line by ';', so 'show databases' is recognized and executed, > '--some comment here\n show tables' is considered a comment and discarded. > my solution is to just remove comment before split by ';', the code can refer to solution 2 for similar issue :https://issues.apache.org/jira/browse/HIVE-15820 -- This message was sent by Atlassian JIRA (v6.3.15#6346)