@@ -7682,34 +7682,3 @@ CONSTRAINT check_date CHECK (order_date >= '2023-01-01')\
76827682 _ => panic ! ( "Expected CreateTable" ) ,
76837683 }
76847684}
7685-
7686- #[ test]
7687- fn parse_create_table_partition_of_works_without_dialect_check ( ) {
7688- use sqlparser:: dialect:: { GenericDialect , MySqlDialect , SQLiteDialect } ;
7689- use sqlparser:: test_utils:: TestedDialects ;
7690-
7691- let sql = "CREATE TABLE measurement_y2006m02 PARTITION OF measurement FOR VALUES FROM ('2006-02-01') TO ('2006-03-01')" ;
7692- let dialects = TestedDialects :: new ( vec ! [
7693- Box :: new( GenericDialect { } ) ,
7694- Box :: new( PostgreSqlDialect { } ) ,
7695- Box :: new( MySqlDialect { } ) ,
7696- Box :: new( SQLiteDialect { } ) ,
7697- ] ) ;
7698- match dialects. verified_stmt ( sql) {
7699- Statement :: CreateTable ( create_table) => {
7700- assert_eq ! ( "measurement_y2006m02" , create_table. name. to_string( ) ) ;
7701- assert_eq ! (
7702- Some ( ObjectName :: from( vec![ Ident :: new( "measurement" ) ] ) ) ,
7703- create_table. partition_of
7704- ) ;
7705- match create_table. for_values {
7706- Some ( ForValues :: From { from, to } ) => {
7707- assert_eq ! ( 1 , from. len( ) ) ;
7708- assert_eq ! ( 1 , to. len( ) ) ;
7709- }
7710- _ => panic ! ( "Expected ForValues::From" ) ,
7711- }
7712- }
7713- _ => panic ! ( "Expected CreateTable" ) ,
7714- }
7715- }
0 commit comments