File tree Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Expand file tree Collapse file tree 2 files changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -2803,7 +2803,9 @@ impl fmt::Display for CreateTable {
28032803 if let Some ( file_format) = self . file_format {
28042804 write ! ( f, " STORED AS {file_format}" ) ?;
28052805 }
2806- write ! ( f, " LOCATION '{}'" , self . location. as_ref( ) . unwrap( ) ) ?;
2806+ if let Some ( location) = & self . location {
2807+ write ! ( f, " LOCATION '{location}'" ) ?;
2808+ }
28072809 }
28082810
28092811 match & self . table_options {
Original file line number Diff line number Diff line change @@ -566,3 +566,8 @@ fn hive() -> TestedDialects {
566566fn hive_and_generic ( ) -> TestedDialects {
567567 TestedDialects :: new ( vec ! [ Box :: new( HiveDialect { } ) , Box :: new( GenericDialect { } ) ] )
568568}
569+
570+ #[ test]
571+ fn parse_create_external_table_without_location ( ) {
572+ hive ( ) . verified_stmt ( "CREATE EXTERNAL TABLE t (c INT)" ) ;
573+ }
You can’t perform that action at this time.
0 commit comments