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/10/17 12:07:24 UTC

[GitHub] [shardingsphere] linghengqian edited a comment on issue #13075: SQL cannot use Order By to throw An NPE exception on sharding-column

linghengqian edited a comment on issue #13075:
URL: https://github.com/apache/shardingsphere/issues/13075#issuecomment-945100800


   > Hi @linghengqian , I'm not sure what's wrong for now, looks there's a mistake? means there're shards, seems not match .`tb_result3_sharding_sphere_$->{0..366}``367``autoTablesAmount = 366`
   > 
   > Could you debug and set breakpoint on , when NPE thrown, verify:`OrderByValue.getOrderValuesCaseSensitiveFromTables`
   > 
   > * is  null? If it's true, why  return null?`tableMetaData``schema.get(tableName)`
   > * what's  value`tableName`
   > 
   > And could you supply a demo (and create table sql) to reproduce this issue?
   
   Thank you for your answer, it is indeed that my configuration file is wrong.
   Change
   ```yaml
   spring:
     shardingsphere:
     rules:
       sharding:
         tables:
           tb_result3_sharding_sphere:
             actual-data-nodes: ds0.tb_result3_sharding_sphere_$->{0..366}
   ```
   to
   ```yaml
   spring:
     shardingsphere:
     rules:
       sharding:
         tables:
           tb_result3_sharding_sphere:
             actual-data-nodes: ds0.tb_result3_sharding_sphere_$->{1..366}
   ```
   The main reason is that when I created the table according to the rules of the custom sharding algorithm, tb_result3_sharding_sphere_0 was not created.
   The problem has been resolved, I will close this issue.
   


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