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

   ## Bug Report
   
   When create partitioned tables just like
   
   ```
   CREATE TABLE t_sales
   (
       order_id     INTEGER  NOT NULL,
       goods_name   CHAR(20) NOT NULL,
       sales_date   DATE     NOT NULL,
       sales_volume INTEGER,
       sales_store  CHAR(20),
       PRIMARY KEY ( order_id )
   ) PARTITION BY RANGE (sales_date)(
   PARTITION season1 VALUES LESS THAN('2023-04-01 00:00:00'),
   PARTITION season2 VALUES LESS THAN('2023-07-01 00:00:00'),
   PARTITION season3 VALUES LESS THAN('2023-10-01 00:00:00'),
   PARTITION season4 VALUES LESS THAN(MAXVALUE));
   ```
   
   it's can't parse correctly, will get the SQLParsingException.
   
   ```
   org.apache.shardingsphere.sql.parser.exception.SQLParsingException: You have 
an error in your SQL syntax: CREATE TABLE t_sales
   (
       order_id     INTEGER  NOT NULL,
       goods_name   CHAR(20) NOT NULL,
       sales_date   DATE     NOT NULL,
       sales_volume INTEGER,
       sales_store  CHAR(20),
       PRIMARY KEY ( order_id )
   ) PARTITION BY RANGE (sales_date)(
   PARTITION season1 VALUES LESS THAN('2023-04-01 00:00:00'),
   PARTITION season2 VALUES LESS THAN('2023-07-01 00:00:00'),
   PARTITION season3 VALUES LESS THAN('2023-10-01 00:00:00'),
   PARTITION season4 VALUES LESS THAN(MAXVALUE));, null
   
        at 
org.apache.shardingsphere.sql.parser.core.database.parser.SQLParserExecutor.twoPhaseParse(SQLParserExecutor.java:69)
        at 
org.apache.shardingsphere.sql.parser.core.database.parser.SQLParserExecutor.parse(SQLParserExecutor.java:48)
        at 
org.apache.shardingsphere.sql.parser.api.SQLParserEngine.parse(SQLParserEngine.java:47)
        at 
org.apache.shardingsphere.infra.parser.sql.SQLStatementParserExecutor.parse(SQLStatementParserExecutor.java:46)
        at 
org.apache.shardingsphere.infra.parser.sql.SQLStatementParserEngine.parse(SQLStatementParserEngine.java:47)
        at 
org.apache.shardingsphere.infra.parser.ShardingSphereSQLParserEngine.parse(ShardingSphereSQLParserEngine.java:52)
        at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.createQueryContext(ShardingSphereStatement.java:536)
        at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.execute0(ShardingSphereStatement.java:465)
        at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSphereStatement.execute(ShardingSphereStatement.java:413)
        at org.apache.shardingsphere.test.e2e.da
   ```
   
   ### Which version of ShardingSphere did you use?
   
   master
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-JDBC
   
   ### Expected behavior
   
   No exception 
   
   ### Actual behavior
   
   Have excpetion
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   
   ### 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