[
https://issues.apache.org/jira/browse/HIVE-28162?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17832371#comment-17832371
]
TakawaAkirayo commented on HIVE-28162:
--------------------------------------
double quote should be considered to make the placeholder invalid in the hive
JDBC need further investigation
> 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:
> 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)