File tree Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Original file line number Diff line number Diff line change @@ -4413,7 +4413,7 @@ impl fmt::Display for Statement {
4413
4413
let keyword = match & db_name_keyword {
4414
4414
Some ( Keyword :: FROM ) => "FROM" ,
4415
4415
Some ( Keyword :: IN ) => "IN" ,
4416
- _ => "" , // unexpected
4416
+ _ => unreachable ! ( ) ,
4417
4417
} ;
4418
4418
write ! ( f, " {} {db_name}" , keyword) ?;
4419
4419
}
@@ -4422,17 +4422,17 @@ impl fmt::Display for Statement {
4422
4422
}
4423
4423
Ok ( ( ) )
4424
4424
}
4425
- Statement :: ShowViews {
4426
- db_name_keyword,
4427
- db_name,
4428
- filter
4425
+ Statement :: ShowViews {
4426
+ db_name_keyword,
4427
+ db_name,
4428
+ filter,
4429
4429
} => {
4430
4430
write ! ( f, "SHOW VIEWS" ) ?;
4431
4431
if let Some ( db_name) = db_name {
4432
4432
let keyword = match & db_name_keyword {
4433
4433
Some ( Keyword :: FROM ) => "FROM" ,
4434
4434
Some ( Keyword :: IN ) => "IN" ,
4435
- _ => "" , // unexpected
4435
+ _ => unreachable ! ( ) ,
4436
4436
} ;
4437
4437
write ! ( f, " {} {db_name}" , keyword) ?;
4438
4438
}
Original file line number Diff line number Diff line change @@ -536,16 +536,16 @@ fn parse_use() {
536
536
537
537
#[ test]
538
538
fn test_show ( ) {
539
- hive ( ) . verified_stmt ( "SHOW DATABASES" ) ;
540
- hive ( ) . verified_stmt ( "SHOW DATABASES LIKE '%abc'" ) ;
541
- hive ( ) . verified_stmt ( "SHOW SCHEMAS" ) ;
542
- hive ( ) . verified_stmt ( "SHOW SCHEMAS LIKE '%abc'" ) ;
543
- hive ( ) . verified_stmt ( "SHOW TABLES" ) ;
544
- hive ( ) . verified_stmt ( "SHOW TABLES IN db1" ) ;
545
- hive ( ) . verified_stmt ( "SHOW TABLES IN db1 'abc'" ) ;
546
- hive ( ) . verified_stmt ( "SHOW VIEWS" ) ;
547
- hive ( ) . verified_stmt ( "SHOW VIEWS IN db1" ) ;
548
- hive ( ) . verified_stmt ( "SHOW VIEWS IN db1 'abc'" ) ;
539
+ hive_and_generic ( ) . verified_stmt ( "SHOW DATABASES" ) ;
540
+ hive_and_generic ( ) . verified_stmt ( "SHOW DATABASES LIKE '%abc'" ) ;
541
+ hive_and_generic ( ) . verified_stmt ( "SHOW SCHEMAS" ) ;
542
+ hive_and_generic ( ) . verified_stmt ( "SHOW SCHEMAS LIKE '%abc'" ) ;
543
+ hive_and_generic ( ) . verified_stmt ( "SHOW TABLES" ) ;
544
+ hive_and_generic ( ) . verified_stmt ( "SHOW TABLES IN db1" ) ;
545
+ hive_and_generic ( ) . verified_stmt ( "SHOW TABLES IN db1 'abc'" ) ;
546
+ hive_and_generic ( ) . verified_stmt ( "SHOW VIEWS" ) ;
547
+ hive_and_generic ( ) . verified_stmt ( "SHOW VIEWS IN db1" ) ;
548
+ hive_and_generic ( ) . verified_stmt ( "SHOW VIEWS IN db1 'abc'" ) ;
549
549
}
550
550
551
551
fn hive ( ) -> TestedDialects {
You can’t perform that action at this time.
0 commit comments