You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2021/11/04 13:43:08 UTC

[GitHub] [shardingsphere] gooddr opened a new issue #13465: When JSON appears, SQL parse has error

gooddr opened a new issue #13465:
URL: https://github.com/apache/shardingsphere/issues/13465


   ## 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?
   4.1.1
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   ### Expected behavior
   tenant_id = 100001
   ### Actual behavior
   tenant_id = 1
   ### Reason analyze (If you can)
   json_extract(user.extend_field,'$.sk0') parse error 
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   select user.id as user_id from tenant_user as user where  json_extract(user.extend_field,'$.sk0')=? and user.tenant_id=? and user.is_del=?    ::: [1, 100001, 0]
   shardingColumn = tenant_id
   ### Example codes for reproduce this issue (such as a github link).
   ------1
   shardingRuleConfig.setDefaultDatabaseShardingStrategyConfig(new StandardShardingStrategyConfiguration("tenant_id",new DBPreciseShardingAlgorithm()));
   ------2
   public class DatabasePreciseShardingAlgorithm implements PreciseShardingAlgorithm<Long> {
       @Override
       public String doSharding(Collection<String> availableTargetNames, PreciseShardingValue<Long> shardingValue) {
           log.warn("tenant_id = {}", shardingValue);            
           return dataSource; 
       }
   
   }
   
   


-- 
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

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



[GitHub] [shardingsphere] strongduanmu commented on issue #13465: When JSON appears, SQL parse has error

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #13465:
URL: https://github.com/apache/shardingsphere/issues/13465#issuecomment-961522280


   Hi @gooddr, thank you for your feedback, can you try the latest version?


-- 
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

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



[GitHub] [shardingsphere] strongduanmu commented on issue #13465: When JSON appears, SQL parse has error

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #13465:
URL: https://github.com/apache/shardingsphere/issues/13465#issuecomment-961522280


   Hi @gooddr, thank you for your feedback, can you try the latest version?


-- 
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

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



[GitHub] [shardingsphere] tuichenchuxin commented on issue #13465: When JSON appears, SQL parse has error

Posted by GitBox <gi...@apache.org>.
tuichenchuxin commented on issue #13465:
URL: https://github.com/apache/shardingsphere/issues/13465#issuecomment-972565479


   @strongduanmu I have tried this issue.It's supported now on 5.X


-- 
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

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



[GitHub] [shardingsphere] strongduanmu commented on issue #13465: When JSON appears, SQL parse has error

Posted by GitBox <gi...@apache.org>.
strongduanmu commented on issue #13465:
URL: https://github.com/apache/shardingsphere/issues/13465#issuecomment-961522280


   Hi @gooddr, thank you for your feedback, can you try the latest version?


-- 
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

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



[GitHub] [shardingsphere] gooddr commented on issue #13465: When JSON appears, SQL parse has error

Posted by GitBox <gi...@apache.org>.
gooddr commented on issue #13465:
URL: https://github.com/apache/shardingsphere/issues/13465#issuecomment-961665677


   > Hi @gooddr, thank you for your feedback, can you try the latest version?
   
   ok.i will try. thanks.


-- 
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

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



[GitHub] [shardingsphere] gooddr commented on issue #13465: When JSON appears, SQL parse has error

Posted by GitBox <gi...@apache.org>.
gooddr commented on issue #13465:
URL: https://github.com/apache/shardingsphere/issues/13465#issuecomment-961665677






-- 
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

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