[jira] [Comment Edited] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages

2018-10-26 Thread Soumabrata Chakraborty (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-20608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16665241#comment-16665241
 ] 

Soumabrata Chakraborty edited comment on HIVE-20608 at 10/26/18 2:22 PM:
-

Hi [~daijy]

Yes - the code you pointed out from ExecuteStatementOperation.java does trim 
the statement and at this moment is the only point from which 
HiveCommandOperation's runInternal() method may be reached.

However,  I believe HiveCommandOperation.java and runInternal() should be self 
sufficient and should not depend on operation in another class to trim the 
statement for it.

In fact, if you look at the current code for HiveCommandOperation.java then it 
does trim the statement on line 109 (self sufficiency) but fails to use this 
trimmed version in next line (i.e. line 110).  This is exactly what my change 
fixes. 

References: 
 # 
[https://github.com/apache/hive/blob/0d7015468611c485c01bb80cdbe4c89e4e68b680/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java#L109]
 # 
[https://github.com/apache/hive/pull/442/files#diff-459cb15e0bcb0c7f00727e0dcf63a3b0]
 

I agree that functionally it is not a bug at the moment.  That said, I think 
this change shall make the code more robust.

I leave it up to your discretion to decide on the course of action.


was (Author: soumabrata):
Hi [~daijy]

Yes - the code you pointed out from ExecuteStatementOperation.java does trim 
the statement and at this moment is the only point from which 
HiveCommandOperation's runInternal() method may be reached.

However,  I believe HiveCommandOperation.java and runInternal() should be self 
sufficient and should not depend on operation in another class to trim the 
statement for it.

In fact, if you look at the current code for HiveCommandOperation.java then it 
does trim the statement on line 109 (self sufficiency) but fails to use this 
trimmed version in next line (i.e. line 110).  This is exactly what my change 
fixes.  (Reference 
https://github.com/apache/hive/blob/0d7015468611c485c01bb80cdbe4c89e4e68b680/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java#L109)

I agree that functionally it is not a bug at the moment.  That said, I think 
this change shall make the code more robust.

I leave it up to your discretion to decide on the course of action.

> Incorrect handling of sql command args in hive service leading to misleading 
> 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.2.patch, HIVE-20608.patch
>
>
> *Steps to reproduce:*
> (1) Connect to HiveServer2 using JDBC driver (not via Beeline)
> (2) Execute a set command with a space before set – e.g. " set 
> hive.exec.dynamic.partiton=true"
> (3) The error that is returned says: 
> {code:java}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while 
> processing 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}
>  (4) However on removing the space before the set command - it works fine.
>  
> *Analysis:*
> Looks like an issue with 
> [https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java]
>  
> In the runInternal() method, the untrimmed sql statement is split by space 
> (\\s) but the substring operation to get the command args is done on the 
> trimmed sql statement.  This causes the issue. 
> {code:java}
> String command = getStatement().trim(); 
> String[] tokens = statement.split("\\s"); 
> String commandArgs = command.substring(tokens[0].length()).trim();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages

2018-10-26 Thread Soumabrata Chakraborty (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-20608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16665241#comment-16665241
 ] 

Soumabrata Chakraborty commented on HIVE-20608:
---

Hi [~daijy]

Yes - the code you pointed out from ExecuteStatementOperation.java does trim 
the statement and at this moment is the only point from which 
HiveCommandOperation's runInternal() method may be reached.

However,  I believe HiveCommandOperation.java and runInternal() should be self 
sufficient and should not depend on operation in another class to trim the 
statement for it.

In fact, if you look at the current code for HiveCommandOperation.java then it 
does trim the statement on line 109 (self sufficiency) but fails to use this 
trimmed version in next line (i.e. line 110).  This is exactly what my change 
fixes.  (Reference 
https://github.com/apache/hive/blob/0d7015468611c485c01bb80cdbe4c89e4e68b680/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java#L109)

I agree that functionally it is not a bug at the moment.  That said, I think 
this change shall make the code more robust.

I leave it up to your discretion to decide on the course of action.

> Incorrect handling of sql command args in hive service leading to misleading 
> 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.2.patch, HIVE-20608.patch
>
>
> *Steps to reproduce:*
> (1) Connect to HiveServer2 using JDBC driver (not via Beeline)
> (2) Execute a set command with a space before set – e.g. " set 
> hive.exec.dynamic.partiton=true"
> (3) The error that is returned says: 
> {code:java}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while 
> processing 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}
>  (4) However on removing the space before the set command - it works fine.
>  
> *Analysis:*
> Looks like an issue with 
> [https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java]
>  
> In the runInternal() method, the untrimmed sql statement is split by space 
> (\\s) but the substring operation to get the command args is done on the 
> trimmed sql statement.  This causes the issue. 
> {code:java}
> String command = getStatement().trim(); 
> String[] tokens = statement.split("\\s"); 
> String commandArgs = command.substring(tokens[0].length()).trim();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages

2018-10-22 Thread Soumabrata Chakraborty (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-20608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16659029#comment-16659029
 ] 

Soumabrata Chakraborty commented on HIVE-20608:
---

Hi [~daijy],  thats ExecuteStatementOperation.java that you mention whereas my 
changes are to HiveCommandOperation.

Do you mean that its ExecuteStatementOperation that routes commands to 
HiveCommandOperation?

> Incorrect handling of sql command args in hive service leading to misleading 
> 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.2.patch, HIVE-20608.patch
>
>
> *Steps to reproduce:*
> (1) Connect to HiveServer2 using JDBC driver (not via Beeline)
> (2) Execute a set command with a space before set – e.g. " set 
> hive.exec.dynamic.partiton=true"
> (3) The error that is returned says: 
> {code:java}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while 
> processing 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}
>  (4) However on removing the space before the set command - it works fine.
>  
> *Analysis:*
> Looks like an issue with 
> [https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java]
>  
> In the runInternal() method, the untrimmed sql statement is split by space 
> (\\s) but the substring operation to get the command args is done on the 
> trimmed sql statement.  This causes the issue. 
> {code:java}
> String command = getStatement().trim(); 
> String[] tokens = statement.split("\\s"); 
> String commandArgs = command.substring(tokens[0].length()).trim();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages

2018-10-07 Thread Soumabrata Chakraborty (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-20608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16641365#comment-16641365
 ] 

Soumabrata Chakraborty commented on HIVE-20608:
---

Hi [~daijy] - yes beeline trims the command before sending to hiverserver2 
which is why this issue of HiveServer2 not handling untrimmed statement does 
not come to surface.

The issue will be reproducible if you use Java JDBC Driver for HiveServer2. 

Basically do something like:

 
{code:java}
Connection connection = 
DriverManager.getConnection("jdbc:hive2://localhost:1/");
connection.createStatement().execute(" set a = b");

{code}
 

Also, if you remove my change to the HiveCommandOperation.java and then run the 
new test case I introduced you will see that it computes the command arguments 
incorrectly and it fails.

> Incorrect handling of sql command args in hive service leading to misleading 
> 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.2.patch, HIVE-20608.patch
>
>
> *Steps to reproduce:*
> (1) Connect to HiveServer2 using JDBC driver (not via Beeline)
> (2) Execute a set command with a space before set – e.g. " set 
> hive.exec.dynamic.partiton=true"
> (3) The error that is returned says: 
> {code:java}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while 
> processing 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}
>  (4) However on removing the space before the set command - it works fine.
>  
> *Analysis:*
> Looks like an issue with 
> [https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java]
>  
> In the runInternal() method, the untrimmed sql statement is split by space 
> (\\s) but the substring operation to get the command args is done on the 
> trimmed sql statement.  This causes the issue. 
> {code:java}
> String command = getStatement().trim(); 
> String[] tokens = statement.split("\\s"); 
> String commandArgs = command.substring(tokens[0].length()).trim();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages

2018-10-06 Thread Soumabrata Chakraborty (JIRA)


 [ 
https://issues.apache.org/jira/browse/HIVE-20608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Soumabrata Chakraborty updated HIVE-20608:
--
Attachment: HIVE-20608.2.patch
Status: Patch Available  (was: In Progress)

[~daijy]  Submitted second patch with test case included.  (The PR 
[https://github.com/apache/hive/pull/442] is also updated)

> Incorrect handling of sql command args in hive service leading to misleading 
> 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.2.patch, HIVE-20608.patch
>
>
> *Steps to reproduce:*
> (1) Connect to HiveServer2 using JDBC driver (not via Beeline)
> (2) Execute a set command with a space before set – e.g. " set 
> hive.exec.dynamic.partiton=true"
> (3) The error that is returned says: 
> {code:java}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while 
> processing 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}
>  (4) However on removing the space before the set command - it works fine.
>  
> *Analysis:*
> Looks like an issue with 
> [https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java]
>  
> In the runInternal() method, the untrimmed sql statement is split by space 
> (\\s) but the substring operation to get the command args is done on the 
> trimmed sql statement.  This causes the issue. 
> {code:java}
> String command = getStatement().trim(); 
> String[] tokens = statement.split("\\s"); 
> String commandArgs = command.substring(tokens[0].length()).trim();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages

2018-10-04 Thread Soumabrata Chakraborty (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-20608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16638196#comment-16638196
 ] 

Soumabrata Chakraborty commented on HIVE-20608:
---

Well the bug is actually reproducible by using any set command with a space at 
the beginning.  The issue is related to incorrect calculator of command args.

For example: given statement " set a.b.c.d=xyz" - the command should be "set" 
and the command argument should be "a.b.c.d=xyz".

However, due to this bug,  the command is derived correctly as "set" but the 
command argument itself is calculated as "set a.b.c.d=xyz" instead of only 
"a.b.c.d=xyz" and so it ends up complaining that "Cannot modify set a.b.c.d at 
runtime"

Hope this makes it clear

> Incorrect handling of sql command args in hive service leading to misleading 
> 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) Execute a set command with a space before set – e.g. " set 
> hive.exec.dynamic.partiton=true"
> (3) The error that is returned says: 
> {code:java}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while 
> processing 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}
>  (4) However on removing the space before the set command - it works fine.
>  
> *Analysis:*
> Looks like an issue with 
> [https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java]
>  
> In the runInternal() method, the untrimmed sql statement is split by space 
> (\\s) but the substring operation to get the command args is done on the 
> trimmed sql statement.  This causes the issue. 
> {code:java}
> String command = getStatement().trim(); 
> String[] tokens = statement.split("\\s"); 
> String commandArgs = command.substring(tokens[0].length()).trim();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages

2018-10-03 Thread Soumabrata Chakraborty (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-20608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16637309#comment-16637309
 ] 

Soumabrata Chakraborty commented on HIVE-20608:
---

Hi [~daijy] - There isn't any pre-existing test case for 
org.apache.hive.service.cli.operation.HiveCommandOperation to which I can add.

Also there seems to be no clean way of testing just the changes made without 
writing a test set-up for the whole class which seems pretty involved.

Please advise

> Incorrect handling of sql command args in hive service leading to misleading 
> 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) Execute a set command with a space before set – e.g. " set 
> hive.exec.dynamic.partiton=true"
> (3) The error that is returned says: 
> {code:java}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while 
> processing 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}
>  (4) However on removing the space before the set command - it works fine.
>  
> *Analysis:*
> Looks like an issue with 
> [https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java]
>  
> In the runInternal() method, the untrimmed sql statement is split by space 
> (\\s) but the substring operation to get the command args is done on the 
> trimmed sql statement.  This causes the issue. 
> {code:java}
> String command = getStatement().trim(); 
> String[] tokens = statement.split("\\s"); 
> String commandArgs = command.substring(tokens[0].length()).trim();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages

2018-10-02 Thread Soumabrata Chakraborty (JIRA)


 [ 
https://issues.apache.org/jira/browse/HIVE-20608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Soumabrata Chakraborty updated HIVE-20608:
--
Status: In Progress  (was: Patch Available)

Working on adding test case

> Incorrect handling of sql command args in hive service leading to misleading 
> 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) Execute a set command with a space before set – e.g. " set 
> hive.exec.dynamic.partiton=true"
> (3) The error that is returned says: 
> {code:java}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while 
> processing 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}
>  (4) However on removing the space before the set command - it works fine.
>  
> *Analysis:*
> Looks like an issue with 
> [https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java]
>  
> In the runInternal() method, the untrimmed sql statement is split by space 
> (\\s) but the substring operation to get the command args is done on the 
> trimmed sql statement.  This causes the issue. 
> {code:java}
> String command = getStatement().trim(); 
> String[] tokens = statement.split("\\s"); 
> String commandArgs = command.substring(tokens[0].length()).trim();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages

2018-10-02 Thread Soumabrata Chakraborty (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-20608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16636356#comment-16636356
 ] 

Soumabrata Chakraborty commented on HIVE-20608:
---

Ok - I'll add a test case.

> Incorrect handling of sql command args in hive service leading to misleading 
> 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) Execute a set command with a space before set – e.g. " set 
> hive.exec.dynamic.partiton=true"
> (3) The error that is returned says: 
> {code:java}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while 
> processing 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}
>  (4) However on removing the space before the set command - it works fine.
>  
> *Analysis:*
> Looks like an issue with 
> [https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java]
>  
> In the runInternal() method, the untrimmed sql statement is split by space 
> (\\s) but the substring operation to get the command args is done on the 
> trimmed sql statement.  This causes the issue. 
> {code:java}
> String command = getStatement().trim(); 
> String[] tokens = statement.split("\\s"); 
> String commandArgs = command.substring(tokens[0].length()).trim();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages

2018-10-02 Thread Soumabrata Chakraborty (JIRA)


 [ 
https://issues.apache.org/jira/browse/HIVE-20608?page=com.atlassian.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 misleading 
> 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) Execute a set command with a space before set – e.g. " set 
> hive.exec.dynamic.partiton=true"
> (3) The error that is returned says: 
> {code:java}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while 
> processing 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}
>  (4) However on removing the space before the set command - it works fine.
>  
> *Analysis:*
> Looks like an issue with 
> [https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java]
>  
> In the runInternal() method, the untrimmed sql statement is split by space 
> (\\s) but the substring operation to get the command args is done on the 
> trimmed sql statement.  This causes the issue. 
> {code:java}
> String command = getStatement().trim(); 
> String[] tokens = statement.split("\\s"); 
> String commandArgs = command.substring(tokens[0].length()).trim();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages

2018-10-02 Thread Soumabrata Chakraborty (JIRA)


 [ 
https://issues.apache.org/jira/browse/HIVE-20608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Soumabrata Chakraborty updated HIVE-20608:
--
Attachment: (was: HIVE-20608.patch)

> Incorrect handling of sql command args in hive service leading to misleading 
> 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
>
> *Steps to reproduce:*
> (1) Connect to HiveServer2 using JDBC driver (not via Beeline)
> (2) Execute a set command with a space before set – e.g. " set 
> hive.exec.dynamic.partiton=true"
> (3) The error that is returned says: 
> {code:java}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while 
> processing 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}
>  (4) However on removing the space before the set command - it works fine.
>  
> *Analysis:*
> Looks like an issue with 
> [https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java]
>  
> In the runInternal() method, the untrimmed sql statement is split by space 
> (\\s) but the substring operation to get the command args is done on the 
> trimmed sql statement.  This causes the issue. 
> {code:java}
> String command = getStatement().trim(); 
> String[] tokens = statement.split("\\s"); 
> String commandArgs = command.substring(tokens[0].length()).trim();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages

2018-10-02 Thread Soumabrata Chakraborty (JIRA)


 [ 
https://issues.apache.org/jira/browse/HIVE-20608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Soumabrata Chakraborty updated HIVE-20608:
--
Attachment: HIVE-20608.patch

> Incorrect handling of sql command args in hive service leading to misleading 
> 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) Execute a set command with a space before set – e.g. " set 
> hive.exec.dynamic.partiton=true"
> (3) The error that is returned says: 
> {code:java}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while 
> processing 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}
>  (4) However on removing the space before the set command - it works fine.
>  
> *Analysis:*
> Looks like an issue with 
> [https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java]
>  
> In the runInternal() method, the untrimmed sql statement is split by space 
> (\\s) but the substring operation to get the command args is done on the 
> trimmed sql statement.  This causes the issue. 
> {code:java}
> String command = getStatement().trim(); 
> String[] tokens = statement.split("\\s"); 
> String commandArgs = command.substring(tokens[0].length()).trim();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages

2018-10-02 Thread Soumabrata Chakraborty (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-20608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16635713#comment-16635713
 ] 

Soumabrata Chakraborty commented on HIVE-20608:
---

Raised a Pull Request https://github.com/apache/hive/pull/442

> Incorrect handling of sql command args in hive service leading to misleading 
> 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
>
> *Steps to reproduce:*
> (1) Connect to HiveServer2 using JDBC driver (not via Beeline)
> (2) Execute a set command with a space before set – e.g. " set 
> hive.exec.dynamic.partiton=true"
> (3) The error that is returned says: 
> {code:java}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while 
> processing 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}
>  (4) However on removing the space before the set command - it works fine.
>  
> *Analysis:*
> Looks like an issue with 
> [https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java]
>  
> In the runInternal() method, the untrimmed sql statement is split by space 
> (\\s) but the substring operation to get the command args is done on the 
> trimmed sql statement.  This causes the issue. 
> {code:java}
> String command = getStatement().trim(); 
> String[] tokens = statement.split("\\s"); 
> String commandArgs = command.substring(tokens[0].length()).trim();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Work started] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages

2018-10-02 Thread Soumabrata Chakraborty (JIRA)


 [ 
https://issues.apache.org/jira/browse/HIVE-20608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Work on HIVE-20608 started by Soumabrata Chakraborty.
-
> Incorrect handling of sql command args in hive service leading to misleading 
> 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
>
> *Steps to reproduce:*
> (1) Connect to HiveServer2 using JDBC driver (not via Beeline)
> (2) Execute a set command with a space before set – e.g. " set 
> hive.exec.dynamic.partiton=true"
> (3) The error that is returned says: 
> {code:java}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while 
> processing 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}
>  (4) However on removing the space before the set command - it works fine.
>  
> *Analysis:*
> Looks like an issue with 
> [https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java]
>  
> In the runInternal() method, the untrimmed sql statement is split by space 
> (\\s) but the substring operation to get the command args is done on the 
> trimmed sql statement.  This causes the issue. 
> {code:java}
> String command = getStatement().trim(); 
> String[] tokens = statement.split("\\s"); 
> String commandArgs = command.substring(tokens[0].length()).trim();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages

2018-10-02 Thread Soumabrata Chakraborty (JIRA)


 [ 
https://issues.apache.org/jira/browse/HIVE-20608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Soumabrata Chakraborty reassigned HIVE-20608:
-

Assignee: Soumabrata Chakraborty  (was: Li Jiang)

> Incorrect handling of sql command args in hive service leading to misleading 
> 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
>
> *Steps to reproduce:*
> (1) Connect to HiveServer2 using JDBC driver (not via Beeline)
> (2) Execute a set command with a space before set – e.g. " set 
> hive.exec.dynamic.partiton=true"
> (3) The error that is returned says: 
> {code:java}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while 
> processing 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}
>  (4) However on removing the space before the set command - it works fine.
>  
> *Analysis:*
> Looks like an issue with 
> [https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java]
>  
> In the runInternal() method, the untrimmed sql statement is split by space 
> (\\s) but the substring operation to get the command args is done on the 
> trimmed sql statement.  This causes the issue. 
> {code:java}
> String command = getStatement().trim(); 
> String[] tokens = statement.split("\\s"); 
> String commandArgs = command.substring(tokens[0].length()).trim();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Commented] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages

2018-10-02 Thread Soumabrata Chakraborty (JIRA)


[ 
https://issues.apache.org/jira/browse/HIVE-20608?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16635148#comment-16635148
 ] 

Soumabrata Chakraborty commented on HIVE-20608:
---

I have the fix ready. Will submit soon. Please assign back to me

> Incorrect handling of sql command args in hive service leading to misleading 
> error messages
> ---
>
> Key: HIVE-20608
> URL: https://issues.apache.org/jira/browse/HIVE-20608
> Project: Hive
>  Issue Type: Bug
>Reporter: Soumabrata Chakraborty
>Assignee: Li Jiang
>Priority: Major
>
> *Steps to reproduce:*
> (1) Connect to HiveServer2 using JDBC driver (not via Beeline)
> (2) Execute a set command with a space before set – e.g. " set 
> hive.exec.dynamic.partiton=true"
> (3) The error that is returned says: 
> {code:java}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while 
> processing 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}
>  (4) However on removing the space before the set command - it works fine.
>  
> *Analysis:*
> Looks like an issue with 
> [https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java]
>  
> In the runInternal() method, the untrimmed sql statement is split by space 
> (\\s) but the substring operation to get the command args is done on the 
> trimmed sql statement.  This causes the issue. 
> {code:java}
> String command = getStatement().trim(); 
> String[] tokens = statement.split("\\s"); 
> String commandArgs = command.substring(tokens[0].length()).trim();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages

2018-09-20 Thread Soumabrata Chakraborty (JIRA)


 [ 
https://issues.apache.org/jira/browse/HIVE-20608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Soumabrata Chakraborty updated HIVE-20608:
--
Description: 
*Steps to reproduce:*

(1) Connect to HiveServer2 using JDBC driver (not via Beeline)

(2) Execute a set command with a space before set – e.g. " set 
hive.exec.dynamic.partiton=true"

(3) The error that is returned says: 
{code:java}
Caused by: org.apache.hive.service.cli.HiveSQLException: Error while processing 
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}
 (4) However on removing the space before the set command - it works fine.

 

*Analysis:*

Looks like an issue with 
[https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java]
 

In the runInternal() method, the untrimmed sql statement is split by space 
(\\s) but the substring operation to get the command args is done on the 
trimmed sql statement.  This causes the issue. 
{code:java}
String command = getStatement().trim(); 
String[] tokens = statement.split("\\s"); 
String commandArgs = command.substring(tokens[0].length()).trim();
{code}

  was:
Steps to reproduce:

(1) Connect to HiveServer2 using JDBC driver (not via Beeline)

(2) Execute a set command with a space before set – e.g. " set 
hive.exec.dynamic.partiton=true"

(3) The error that is returned says: 
{code:java}
Caused by: org.apache.hive.service.cli.HiveSQLException: Error while processing 
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}
 (4) However on removing the space before the set command - it works fine.


> Incorrect handling of sql command args in hive service leading to misleading 
> 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
>
> *Steps to reproduce:*
> (1) Connect to HiveServer2 using JDBC driver (not via Beeline)
> (2) Execute a set command with a space before set – e.g. " set 
> hive.exec.dynamic.partiton=true"
> (3) The error that is returned says: 
> {code:java}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while 
> processing 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}
>  (4) However on removing the space before the set command - it works fine.
>  
> *Analysis:*
> Looks like an issue with 
> [https://github.com/apache/hive/blob/master/service/src/java/org/apache/hive/service/cli/operation/HiveCommandOperation.java]
>  
> In the runInternal() method, the untrimmed sql statement is split by space 
> (\\s) but the substring operation to get the command args is done on the 
> trimmed sql statement.  This causes the issue. 
> {code:java}
> String command = getStatement().trim(); 
> String[] tokens = statement.split("\\s"); 
> String commandArgs = command.substring(tokens[0].length()).trim();
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Updated] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages

2018-09-20 Thread Soumabrata Chakraborty (JIRA)


 [ 
https://issues.apache.org/jira/browse/HIVE-20608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Soumabrata Chakraborty updated HIVE-20608:
--
Description: 
Steps to reproduce:

(1) Connect to HiveServer2 using JDBC driver (not via Beeline)

(2) Execute a set command with a space before set – e.g. " set 
hive.exec.dynamic.partiton=true"

(3) The error that is returned says: 
{code:java}
Caused by: org.apache.hive.service.cli.HiveSQLException: Error while processing 
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}
 (4) However on removing the space before the set command - it works fine.

> Incorrect handling of sql command args in hive service leading to misleading 
> 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
>
> Steps to reproduce:
> (1) Connect to HiveServer2 using JDBC driver (not via Beeline)
> (2) Execute a set command with a space before set – e.g. " set 
> hive.exec.dynamic.partiton=true"
> (3) The error that is returned says: 
> {code:java}
> Caused by: org.apache.hive.service.cli.HiveSQLException: Error while 
> processing 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}
>  (4) However on removing the space before the set command - it works fine.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Assigned] (HIVE-20608) Incorrect handling of sql command args in hive service leading to misleading error messages

2018-09-19 Thread Soumabrata Chakraborty (JIRA)


 [ 
https://issues.apache.org/jira/browse/HIVE-20608?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Soumabrata Chakraborty reassigned HIVE-20608:
-


> Incorrect handling of sql command args in hive service leading to misleading 
> 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
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)