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

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   5.3.2
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   proxy
   ### Expected behavior
   get `count(*)` result by querying the sharding table
   ### Actual behavior
   NPE was reported
   
![image](https://github.com/apache/shardingsphere/assets/46043280/6276e363-f69d-418f-8130-86b33c5a1066)
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   **sharding rule:**
   ```yaml
   rules:
   - !SHARDING
     tables:
       T_Service_Order:
         actualDataNodes: ds_${0..7}.T_Service_Order
         databaseStrategy:
           standard:
             shardingColumn: Super_Account_No
             shardingAlgorithmName: database_mod
     shardingAlgorithms:
       database_mod:
         type: MOD
         props:
           sharding-count: 8
   ```
   **datasource:**
   ```yaml
   dataSources:
     ds_0:
       url: jdbc:postgresql://127.0.0.1:5432/db0
       username: test
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_1:
       url: jdbc:postgresql://127.0.0.1:5432/db1
       username: test
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_2:
       url: jdbc:postgresql://127.0.0.1:5432/db2
       username: test
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_3:
       url: jdbc:postgresql://127.0.0.1:5432/db3
       username: test
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_4:
       url: jdbc:postgresql://127.0.0.1:5432/db4
       username: test
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_5:
       url: jdbc:postgresql://127.0.0.1:5432/db5
       username: test
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_6:
       url: jdbc:postgresql://127.0.0.1:5432/db6
       username: test
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
     ds_7:
       url: jdbc:postgresql://127.0.0.1:5432/db7
       username: test
       password: 123456
       connectionTimeoutMilliseconds: 30000
       idleTimeoutMilliseconds: 60000
       maxLifetimeMilliseconds: 1800000
       maxPoolSize: 50
       minPoolSize: 1
   ```
   **query data:**
   ```sql
   select * from t_service_order;
   ```
   
![image](https://github.com/apache/shardingsphere/assets/46043280/fa30313b-0f78-4819-b239-184c1ec3e9c9)
   
![image](https://github.com/apache/shardingsphere/assets/46043280/47454a2e-be76-413c-a3e7-85b68050acf9)
   
   **query count:**
   ```sql
   select count(*) from t_service_order;
   ```
   
![image](https://github.com/apache/shardingsphere/assets/46043280/8f992643-2a8d-487e-9b25-0bcf3bf03b56)
   
![image](https://github.com/apache/shardingsphere/assets/46043280/d8e8912f-8c32-43dd-9526-4115e37d970f)
   
   ### 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