You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2024/03/29 07:47:00 UTC
[jira] [Updated] (HIVE-28162) Incorrect argument replacement of Hive JDBC
[ https://issues.apache.org/jira/browse/HIVE-28162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated HIVE-28162:
----------------------------------
Labels: pull-request-available (was: )
> Incorrect argument replacement of Hive JDBC
> -------------------------------------------
>
> Key: HIVE-28162
> URL: https://issues.apache.org/jira/browse/HIVE-28162
> Project: Hive
> Issue Type: Bug
> Affects Versions: All Versions
> Reporter: TakawaAkirayo
> Assignee: TakawaAkirayo
> Priority: Major
> Labels: pull-request-available
>
> 1.Description:
> SQLs contains '?' only in the double quote or comment will meet below issue:
>
> {code:java}
> java.sql.SQLException: Parameter #1 is unset
> at org.apache.hive.jdbc.HivePreparedStatement.updateSql(HivePreparedStatement.java:122)
> at org.apache.hive.jdbc.HivePreparedStatement.execute(HivePreparedStatement.java:89)
>
> {code}
> 2.Reproduce Examples:
> 1)Below sql contains regex expression within double quote, the ? below should be an invalid parameter placeholder similar to the case that within single quote
> {code:java}
> select
> field_a
> from table_a
> where field_b rlike "[a-zA-Z]+?"{code}
> 2)The sql might contain comments and the ? should be an invalid placeholder if it's within the comment block
> {code:java}
> select
> -- ? some comment
> field_a,
> field_b
> from table_any{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)