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

Wenjun Ruan commented on HIVE-29060:
------------------------------------

Thanks [~neer393] 

> HivePreparedStatement cannot work well with ? in backticks
> ----------------------------------------------------------
>
>                 Key: HIVE-29060
>                 URL: https://issues.apache.org/jira/browse/HIVE-29060
>             Project: Hive
>          Issue Type: Bug
>          Components: JDBC
>    Affects Versions: 4.0.1
>            Reporter: Wenjun Ruan
>            Assignee: Neeraj Khatri
>            Priority: Major
>             Fix For: 4.2.0
>
>
> When I use HivePreparedStatement to execute below sql
> {code:java}
> SELECT `(ds|hr)?.` FROM ? {code}
> got exception
> {code:java}
> java.sql.SQLException: Parameter #2 is unset
>  
> at 
> org.apache.hive.jdbc.HivePreparedStatement.updateSql(HivePreparedStatement.java:122)
> at 
> org.apache.hive.jdbc.HivePreparedStatement.execute(HivePreparedStatement.java:89)
> at 
> org.apache.hive.jdbc.TestHivePreparedStatement.testBackticksWithRegex(TestHivePreparedStatement.java:223)
> at java.base/java.lang.reflect.Method.invoke(Method.java:580) {code}
> Seems HivePreparedStatement cannot work well with this feature 
> https://hive.apache.org/docs/latest/languagemanual-select_27362043/#regex-column-specification



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to