From issues-return-138377-archive-asf-public=cust-asf.ponee.io@hive.apache.org Tue Oct 2 18:19:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id BAAA6180638 for ; Tue, 2 Oct 2018 18:19:03 +0200 (CEST) Received: (qmail 93064 invoked by uid 500); 2 Oct 2018 16:19:02 -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 93055 invoked by uid 99); 2 Oct 2018 16:19:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 02 Oct 2018 16:19:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 577F81A1B4B for ; Tue, 2 Oct 2018 16:19:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id X632gQh8Hk4n for ; Tue, 2 Oct 2018 16:19:01 +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 21CEA5F181 for ; Tue, 2 Oct 2018 16:19:01 +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 668B2E0C57 for ; Tue, 2 Oct 2018 16:19:00 +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 2941F21829 for ; Tue, 2 Oct 2018 16:19:00 +0000 (UTC) Date: Tue, 2 Oct 2018 16:19:00 +0000 (UTC) From: "Soumabrata Chakraborty (JIRA)" To: issues@hive.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages 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-20608?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Soumabrata Chakraborty updated HIVE-20608: ------------------------------------------ Attachment: HIVE-20608.patch Status: Patch Available (was: In Progress) Submitting Patch > Incorrect handling of sql command args in hive service leading to mislead= ing error messages > -------------------------------------------------------------------------= ------------------ > > Key: HIVE-20608 > URL: https://issues.apache.org/jira/browse/HIVE-20608 > Project: Hive > Issue Type: Bug > Reporter: Soumabrata Chakraborty > Assignee: Soumabrata Chakraborty > Priority: Major > Attachments: HIVE-20608.patch > > > *Steps to reproduce:* > (1) Connect to HiveServer2 using JDBC driver (not via Beeline) > (2)=C2=A0Execute a set command with a space before set =E2=80=93 e.g. " s= et hive.exec.dynamic.partiton=3Dtrue" > (3) The error that is returned says:=C2=A0 > {code:java} > Caused by: org.apache.hive.service.cli.HiveSQLException: Error while proc= essing statement: Cannot modify set hive.exec.dynamic.partition at runtime.= It is not in list of params that are allowed to be modified at runtime > {code} > =C2=A0(4) However on removing the space before the set command - it works= fine. > =C2=A0 > *Analysis:* > Looks like an issue with [https://github.com/apache/hive/blob/master/serv= ice/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.jav= a]=C2=A0 > In the runInternal() method, the untrimmed sql statement is split by spac= e (\\s) but the substring operation to get the command args is done on the = trimmed sql statement.=C2=A0 This causes the issue.=C2=A0 > {code:java} > String command =3D getStatement().trim();=20 > String[] tokens =3D statement.split("\\s");=20 > String commandArgs =3D command.substring(tokens[0].length()).trim(); > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)