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

   ## version:
   ShardingSphere Proxy 5.4.0
   
   ```sql
   -- single table
   CREATE TABLE `t_order` (  `id` int NOT NULL,  `name` varchar(45) DEFAULT 
NULL,create_time datetime,  PRIMARY KEY (`id`));
   
   -- sharding table
   CREATE TABLE `t_order_his` (  `id` int NOT NULL,  `name` varchar(45) DEFAULT 
NULL,create_time datetime,  PRIMARY KEY (`id`));
   ```
   t_order_his_202308
   t_order_his_202309
   t_order_his_202310
   t_order_his_202311
   t_order_his_202312
   
   ## Execute the following sql
   ```
   select * from t_order where create_time BETWEEN '2023-12-06 00:00:00' AND 
'2023-12-06 23:59:59'
   union all
   select * from t_order_his where create_time BETWEEN '2023-12-06 00:00:00' 
AND '2023-12-06 23:59:59';
   
   
   
   select * from t_order_his where create_time BETWEEN '2023-12-06 00:00:00' 
AND '2023-12-06 23:59:59'; OK
   
![image](https://github.com/apache/shardingsphere/assets/5884703/68eb1156-38d5-46c4-bfab-2a52824b2a64)
   
   ```
   
   ## Expected behavior
   [INFO ] 2023-12-25 17:48:58.576 [ShardingSphere-Command-0] 
ShardingSphere-SQL - Actual SQL: ds ::: select * from t_order where create_time 
BETWEEN '2023-12-06 00:00:00' AND '2023-12-06 23:59:59'
   union all
   select * from t_order_his_202312 where create_time BETWEEN '2023-12-06 
00:00:00' AND '2023-12-06 23:59:59' UNION ALL select * from t_order where 
create_time BETWEEN '2023-12-06 00:00:00' AND '2023-12-06 23:59:59'
   
   ## Actual behavior
   
![image](https://github.com/apache/shardingsphere/assets/5884703/482be513-74aa-415a-9573-8b7face8b559)
   
   
   
   
   
   
   
   
   
   
   insert into 


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