hongyegu commented on issue #26778: URL: https://github.com/apache/shardingsphere/issues/26778#issuecomment-1622863273
Sorry for this **Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?** ShardingSphere-Proxy-5.3.2 **Actual behavior** I has following the setps 'https://shardingsphere.apache.org/document/current/cn/user-manual/shardingsphere-proxy/migration/usage/ ' and then success to sharding a table by id,then I execute the sql 'select id from info_coordinate WHERE site_id=51 and monitor_type_id=177 and obs_time >= '2023-07-04 00:00:00' and obs_time <='2023-07-05 23:59:59' ORDER BY obs_time desc limit 1;' but an error occurred. **Reason analyze (If you can)** I check the log and it shows the error 'java.lang.NullPointerException: Cannot invoke "org.apache.shardingsphere.infra.metadata.database.schema.model.ShardingSphereTable.getColumns()" because "table" is null', and the actual sql auto add a colum obs_time AS ORDER_BY_DERIVED_0. I try to remove the order by part and execute 'select * from info_coordinate WHERE site_id=51 and monitor_type_id=177 and obs_time >= '2023-07-04 00:00:00' and obs_time <='2023-07-05 23:59:59' limit 1 ' and it successed. And When I use a similar sql in a table config_type which is not a shardding one, then it successed. What surprised me is that when I restart the server and it show me the correct result. So I report it and I want to know if it is a bug Thanks! @terrymanu -- 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]
