We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4beea9a commit 37581a6Copy full SHA for 37581a6
2 files changed
src/ast/ddl.rs
@@ -2803,7 +2803,9 @@ impl fmt::Display for CreateTable {
2803
if let Some(file_format) = self.file_format {
2804
write!(f, " STORED AS {file_format}")?;
2805
}
2806
- write!(f, " LOCATION '{}'", self.location.as_ref().unwrap())?;
+ if let Some(location) = &self.location {
2807
+ write!(f, " LOCATION '{location}'")?;
2808
+ }
2809
2810
2811
match &self.table_options {
tests/sqlparser_hive.rs
@@ -566,3 +566,8 @@ fn hive() -> TestedDialects {
566
fn hive_and_generic() -> TestedDialects {
567
TestedDialects::new(vec![Box::new(HiveDialect {}), Box::new(GenericDialect {})])
568
569
+
570
+#[test]
571
+fn parse_create_external_table_without_location() {
572
+ hive().verified_stmt("CREATE EXTERNAL TABLE t (c INT)");
573
+}
0 commit comments