You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "wjjkh (via GitHub)" <gi...@apache.org> on 2023/03/27 06:08:42 UTC

[GitHub] [shardingsphere] wjjkh opened a new issue, #24853: Exception when JSON_OVERLAPS function and limit in SQL。

wjjkh opened a new issue, #24853:
URL: https://github.com/apache/shardingsphere/issues/24853

   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - Searched open and closed [GitHub issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more details. 
   If no response anymore and we cannot reproduce it on current information, we will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   
   5.2.1
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-JDBC
   
   ### Expected behavior
   
   Success query
   
   ### Actual behavior
   
   Throw a exception "java.lang.String cannot be cast to java.lang.Integer"
   
   ### Reason analyze (If you can)
   
   Wrong paramater index in PaginationValueSegment,expect 1 but actual 0。
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   select       row_id,global_id,content,status_code,status_name,form_version,users,create_user_id,create_username,create_time,update_time,update_user_id,update_username,deleted     from table_template     WHERE JSON_OVERLAPS(json_extract(content, '$.c012'), ?) LIMIT ?
   ![debug1](https://user-images.githubusercontent.com/26946057/227854143-29bea227-073b-4751-bc2c-8369de2842fd.png)
   ![debug2](https://user-images.githubusercontent.com/26946057/227854270-235b1a0d-0ef1-48d6-ac26-99af4b26205e.png)
   
   Success query when more normal operation like =、<>like ... but without JSON_OVERLAPS function.
   ### Example codes for reproduce this issue (such as a github link).
   


-- 
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@shardingsphere.apache.org.apache.org

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