Jenyow opened a new issue #13541:
URL: https://github.com/apache/shardingsphere/issues/13541


   ## Bug Report
   ### Which version of ShardingSphere did you use?
   5.0.0
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   
   ### Expected behavior
   the sql:
   ```
   select count(id) from statistic_data
   ```
   the application.yml fragment:
   ```
   spring:
     shardingsphere:
       rules:
         sharding:
           tables:
             statistic_data:
               actual-data-nodes: 
statistics$->{2020..2022}.statistic_data_$->{['1820A01','1820A02','1820A03']}
               database-strategy:
                 standard:
                   sharding-column: get_time
                   sharding-algorithm-name: get-time-database-sharding-algorithm
               table-strategy:
                 standard:
                   sharding-column: station_code
                   sharding-algorithm-name: 
station-code-table-sharding-algorithm
   ```
   the log
   ```
   ### The error may involve 
com.qm.data.storage.mapper.StatisticDataMapper.countStatisticData
   ### The error occurred while handling results
   ### SQL: select count(id)         from statistic_data
   ### Cause: java.lang.NullPointerException] with root cause
   java.lang.NullPointerException: null
        at 
org.apache.shardingsphere.sharding.merge.dql.groupby.GroupByMemoryMergedResult.getValueCaseSensitiveFromTables(GroupByMemoryMergedResult.java:134)
        at 
org.apache.shardingsphere.sharding.merge.dql.groupby.GroupByMemoryMergedResult.getValueCaseSensitive(GroupByMemoryMergedResult.java:124)
        at 
org.apache.shardingsphere.sharding.merge.dql.groupby.GroupByMemoryMergedResult.init(GroupByMemoryMergedResult.java:73)
        at 
org.apache.shardingsphere.sharding.merge.dql.groupby.GroupByMemoryMergedResult.init(GroupByMemoryMergedResult.java:53)
        at 
org.apache.shardingsphere.infra.merge.result.impl.memory.MemoryMergedResult.<init>(MemoryMergedResult.java:51)
        at 
org.apache.shardingsphere.sharding.merge.dql.groupby.GroupByMemoryMergedResult.<init>(GroupByMemoryMergedResult.java:56)
        at 
org.apache.shardingsphere.sharding.merge.dql.ShardingDQLResultMerger.getGroupByMergedResult(ShardingDQLResultMerger.java:108)
        at 
org.apache.shardingsphere.sharding.merge.dql.ShardingDQLResultMerger.build(ShardingDQLResultMerger.java:78)
        at 
org.apache.shardingsphere.sharding.merge.dql.ShardingDQLResultMerger.merge(ShardingDQLResultMerger.java:63)
        at 
org.apache.shardingsphere.infra.merge.MergeEngine.executeMerge(MergeEngine.java:90)
        at 
org.apache.shardingsphere.infra.merge.MergeEngine.merge(MergeEngine.java:80)
        at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.mergeQuery(ShardingSpherePreparedStatement.java:393)
        at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.getResultSet(ShardingSpherePreparedStatement.java:339)
        at sun.reflect.GeneratedMethodAccessor251.invoke(Unknown Source)
        at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
   ```
   
   It work fine in version 5.0.0-beta.
   
   ### Actual behavior
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   
   ### 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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to