From issues-return-192881-archive-asf-public=cust-asf.ponee.io@hive.apache.org Tue Jun 9 16:10:03 2020 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 [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 5C78518062B for ; Tue, 9 Jun 2020 18:10:03 +0200 (CEST) Received: (qmail 29298 invoked by uid 500); 9 Jun 2020 16:10: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 29236 invoked by uid 99); 9 Jun 2020 16:10:02 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 09 Jun 2020 16:10:02 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 887AE41132 for ; Tue, 9 Jun 2020 16:10:01 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 0E755780550 for ; Tue, 9 Jun 2020 16:10:01 +0000 (UTC) Date: Tue, 9 Jun 2020 16:10:01 +0000 (UTC) From: "ASF GitHub Bot (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 ] ASF GitHub Bot updated HIVE-20608: ---------------------------------- Labels: pull-request-available (was: ) > 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 > Labels: pull-request-available > Attachments: HIVE-20608.2.patch, HIVE-20608.patch > > Time Spent: 10m > Remaining Estimate: 0h > > *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 (v8.3.4#803005)