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

   
![20230616-171045](https://github.com/apache/shardingsphere/assets/20835251/b3335b59-8d6f-4d4d-bdd7-6adb0a88026e)
   
   yml:
           sharding-algorithms:
             date-strategy-inline:
               type: class_based
               props:
                 strategy: standard
                 algorithmClassName: 
com.xxx.cloud.sharding.config.algorithm.DateShardingAlgorithm
             order_complex:
               type: CLASS_BASED
               props:
                 strategy: COMPLEX
                 algorithm-expression: {create_at}
                 algorithmClassName: 
com.xxx.cloud.sharding.config.algorithm.OrderNoComplexShardingAlgorithm
                 allow-range-query-with-inline-sharding: true
   
   ft_order_base_202305   ft_order_base_202306  has been find;
   log undergroud:
   2023-06-16 17:04:42.278  INFO 1328 --- [io-20880-exec-4] ShardingSphere-SQL  
                     : Logic SQL: SELECT COUNT(*) FROM ft_order_base WHERE 
(create_at >= ? AND create_at <= ?)
   2023-06-16 17:04:42.278  INFO 1328 --- [io-20880-exec-4] ShardingSphere-SQL  
                     : SQLStatement: 
MySQLSelectStatement(super=SelectStatement(super=AbstractSQLStatement(parameterCount=2,
 parameterMarkerSegments=[ParameterMarkerExpressionSegment(startIndex=55, 
stopIndex=55, parameterMarkerIndex=0, parameterMarkerType=QUESTION, 
alias=Optional.empty), ParameterMarkerExpressionSegment(startIndex=74, 
stopIndex=74, parameterMarkerIndex=1, parameterMarkerType=QUESTION, 
alias=Optional.empty)], commentSegments=[]), 
projections=ProjectionsSegment(startIndex=7, stopIndex=14, 
projections=[AggregationProjectionSegment(startIndex=7, stopIndex=14, 
type=COUNT, innerExpression=(*), parameters=[], alias=Optional.empty)], 
distinctRow=false), 
from=SimpleTableSegment(tableName=TableNameSegment(startIndex=21, stopIndex=33, 
identifier=IdentifierValue(value=ft_order_base, quoteCharacter=NONE)), 
owner=Optional.empty, alias=Optional.empty), 
where=Optional[WhereSegment(startIndex=35, stopInde
 x=75, expr=BinaryOperationExpression(startIndex=42, stopIndex=74, 
left=BinaryOperationExpression(startIndex=42, stopIndex=55, 
left=ColumnSegment(startIndex=42, stopIndex=50, 
identifier=IdentifierValue(value=create_at, quoteCharacter=NONE), 
owner=Optional.empty), right=ParameterMarkerExpressionSegment(startIndex=55, 
stopIndex=55, parameterMarkerIndex=0, parameterMarkerType=QUESTION, 
alias=Optional.empty), operator=>=, text=create_at >= ?), 
right=BinaryOperationExpression(startIndex=61, stopIndex=74, 
left=ColumnSegment(startIndex=61, stopIndex=69, 
identifier=IdentifierValue(value=create_at, quoteCharacter=NONE), 
owner=Optional.empty), right=ParameterMarkerExpressionSegment(startIndex=74, 
stopIndex=74, parameterMarkerIndex=1, parameterMarkerType=QUESTION, 
alias=Optional.empty), operator=<=, text=create_at <= ?), operator=AND, 
text=create_at >= ? AND create_at <= ?))], groupBy=Optional.empty, 
having=Optional.empty, orderBy=Optional.empty, combines=[]), 
table=Optional.empty, limit=Option
 al.empty, lock=Optional.empty, window=Optional.empty)
   2023-06-16 17:04:42.278  INFO 1328 --- [io-20880-exec-4] ShardingSphere-SQL  
                     : Actual SQL: ds0 ::: SELECT COUNT(*) FROM 
ft_order_base_202305 WHERE (create_at >= ? AND create_at <= ?) UNION ALL SELECT 
COUNT(*) FROM ft_order_base_202306 WHERE (create_at >= ? AND create_at <= ?) 
::: [2023-05-16 17:04:42.273, 2023-06-16 17:04:42.273, 2023-05-16 17:04:42.273, 
2023-06-16 17:04:42.273]
   
   
   


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