@@ -8104,34 +8104,3 @@ CONSTRAINT check_date CHECK (order_date >= '2023-01-01')\
81048104 _ => panic ! ( "Expected CreateTable" ) ,
81058105 }
81068106}
8107-
8108- #[ test]
8109- fn parse_create_table_partition_of_works_without_dialect_check ( ) {
8110- use sqlparser:: dialect:: { GenericDialect , MySqlDialect , SQLiteDialect } ;
8111- use sqlparser:: test_utils:: TestedDialects ;
8112-
8113- let sql = "CREATE TABLE measurement_y2006m02 PARTITION OF measurement FOR VALUES FROM ('2006-02-01') TO ('2006-03-01')" ;
8114- let dialects = TestedDialects :: new ( vec ! [
8115- Box :: new( GenericDialect { } ) ,
8116- Box :: new( PostgreSqlDialect { } ) ,
8117- Box :: new( MySqlDialect { } ) ,
8118- Box :: new( SQLiteDialect { } ) ,
8119- ] ) ;
8120- match dialects. verified_stmt ( sql) {
8121- Statement :: CreateTable ( create_table) => {
8122- assert_eq ! ( "measurement_y2006m02" , create_table. name. to_string( ) ) ;
8123- assert_eq ! (
8124- Some ( ObjectName :: from( vec![ Ident :: new( "measurement" ) ] ) ) ,
8125- create_table. partition_of
8126- ) ;
8127- match create_table. for_values {
8128- Some ( ForValues :: From { from, to } ) => {
8129- assert_eq ! ( 1 , from. len( ) ) ;
8130- assert_eq ! ( 1 , to. len( ) ) ;
8131- }
8132- _ => panic ! ( "Expected ForValues::From" ) ,
8133- }
8134- }
8135- _ => panic ! ( "Expected CreateTable" ) ,
8136- }
8137- }
0 commit comments