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