terrymanu commented on issue #29353:
URL: 
https://github.com/apache/shardingsphere/issues/29353#issuecomment-3620559066

   • Issue Understanding
   
     - In Proxy 5.4.0, actualDataNodes: ds.t_order_${202311..202401} is used. 
Running CREATE TABLE t_order creates t_order_202313...202400, while only 
202311/202312/202401 are expected.
   
     Root Cause
   
     - actualDataNodes uses Groovy inline expressions by default. 
${202311..202401} is a numeric range and expands linearly; it has no “calendar 
month carry” semantics.
     - IntervalShardingAlgorithm handles routing only and does not influence 
inline expression expansion. The expectation of month rollover doesn’t match 
the numeric range expression.
   
     Analysis
   
     - Before DDL is sent, actualDataNodes is expanded, producing 91 table 
names (202311..202401).
     - To generate month-by-month names across years, you need a time-based 
inline expression or explicitly list the tables.
     - Official docs (no blogs):
         - Inline expression <INTERVAL>: 
https://shardingsphere.apache.org/document/current/en/user-manual/common-config/builtin-algorithm/expr/
 
(https://shardingsphere.apache.org/document/current/en/user-manual/common-config/builtin-algorithm/expr/)
         - Built-in sharding algorithms (includes INTERVAL): 
https://shardingsphere.apache.org/document/current/en/user-manual/common-config/builtin-algorithm/sharding/
 
(https://shardingsphere.apache.org/document/current/en/user-manual/common-config/builtin-algorithm/
           sharding/)
   
     Conclusion (Configuration Adjustment)
   
     - This is a configuration usage issue, not a product defect, so we will 
close this issue.
     - Recommended actualDataNodes options:
         - Enumerate explicitly:
   
           actualDataNodes: <LITERAL>ds.t_order_202311, ds.t_order_202312, 
ds.t_order_202401
         - Or generate by month (single data source scenario):
   
           actualDataNodes: 
<INTERVAL>P=ds.t_order_;SP=yyyyMM;DIA=1;DIU=Months;DL=202311;DU=202401


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