You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "TakawaAkirayo (via GitHub)" <gi...@apache.org> on 2024/03/28 09:22:56 UTC

[I] [Bug] Parameter replacement issue due to incorrect sql split [kyuubi]

TakawaAkirayo opened a new issue, #6221:
URL: https://github.com/apache/kyuubi/issues/6221

   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   
   
   ### Search before asking
   
   - [X] I have searched in the [issues](https://github.com/apache/kyuubi/issues?q=is%3Aissue) and found no similar issues.
   
   
   ### Describe the bug
   
   SQLs contains '?' within double quote or comment will meet below issue:
   
   Caused by: org.apache.kyuubi.jdbc.hive.KyuubiSQLException: Parameter #1 is unset
           at org.apache.kyuubi.jdbc.hive.Utils.updateSql(Utils.java:148) ~[kyuubi-hive-jdbc-shaded-1.8.0.0.4.0.jar!/:1.8.0.0.4.0]
           at org.apache.kyuubi.jdbc.hive.KyuubiPreparedStatement.updateSql(KyuubiPreparedStatement.java:82) ~[kyuubi-hive-jdbc-shaded-1.8.0.0.4.0.jar!/:1.8.0.0.4.0]
           at org.apache.kyuubi.jdbc.hive.KyuubiPreparedStatement.execute(KyuubiPreparedStatement.java:64) ~[kyuubi-hive-jdbc-shaded-1.8.0.0.4.0.jar!/:1.8.0.0.4.0]
           at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_222]
           ... 1 more
   
   SQL Examples:
   
   Below sql contains regex expression within double quote, the ? below should be an invalid parameter placeholder similar to the case that within single quote
   ```
   select 
   regexp_extract(field_a, "[a-zA-Z]+?", 0) as extracted_a
   from table_any
   ```
   
   2. The sql might contain comments and the ? should be an invalid placeholder if it's within the comment block
   ```
   select 
   -- ? some comment
   field_a,
   field_b
   from table_any
   ```
   
   ### Affects Version(s)
   
   1.8.0
   
   ### Kyuubi Server Log Output
   
   _No response_
   
   ### Kyuubi Engine Log Output
   
   _No response_
   
   ### Kyuubi Server Configurations
   
   _No response_
   
   ### Kyuubi Engine Configurations
   
   _No response_
   
   ### Additional context
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] Yes. I would be willing to submit a PR with guidance from the Kyuubi community to fix.
   - [ ] No. I cannot submit a PR at this time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [I] [Bug] Parameter replacement issue due to incorrect sql split [kyuubi]

Posted by "pan3793 (via GitHub)" <gi...@apache.org>.
pan3793 closed issue #6221: [Bug] Parameter replacement issue due to incorrect sql split
URL: https://github.com/apache/kyuubi/issues/6221


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org


Re: [I] [Bug] Parameter replacement issue due to incorrect sql split [kyuubi]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #6221:
URL: https://github.com/apache/kyuubi/issues/6221#issuecomment-2024746282

   Hello @TakawaAkirayo,
   Thanks for finding the time to report the issue!
   We really appreciate the community's efforts to improve Apache Kyuubi.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org