File tree 2 files changed +12
-9
lines changed
2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -8351,9 +8351,9 @@ impl<'a> Parser<'a> {
8351
8351
loop {
8352
8352
if self.dialect.supports_object_name_double_dot_notation()
8353
8353
&& idents.len() == 1
8354
- && self.peek_token() == Token::Period
8354
+ && self.consume_token(& Token::Period)
8355
8355
{
8356
- self.next_token();
8356
+ // Empty string here means default schema
8357
8357
idents.push(Ident::new(""));
8358
8358
}
8359
8359
idents.push(self.parse_identifier(in_table_clause)?);
Original file line number Diff line number Diff line change @@ -2851,21 +2851,21 @@ fn test_parse_show_columns_sql() {
2851
2851
fn test_sf_double_dot_notation ( ) {
2852
2852
snowflake ( ) . verified_stmt ( "SELECT * FROM db_name..table_name" ) ;
2853
2853
snowflake ( ) . verified_stmt ( "SELECT * FROM x, y..z JOIN a..b AS b ON x.id = b.id" ) ;
2854
- }
2855
-
2856
- #[ test]
2857
- fn test_sf_double_dot_notation_wrong_position ( ) { }
2858
2854
2859
- #[ test]
2860
- fn test_parse_double_dot_notation_wrong_position ( ) {
2861
2855
assert_eq ! (
2862
2856
snowflake( )
2863
2857
. parse_sql_statements( "SELECT * FROM X.Y.." )
2864
2858
. unwrap_err( )
2865
2859
. to_string( ) ,
2866
2860
"sql parser error: Expected: identifier, found: ."
2867
2861
) ;
2868
-
2862
+ assert_eq ! (
2863
+ snowflake( )
2864
+ . parse_sql_statements( "SELECT * FROM X..Y..Z" )
2865
+ . unwrap_err( )
2866
+ . to_string( ) ,
2867
+ "sql parser error: Expected: identifier, found: ."
2868
+ ) ;
2869
2869
assert_eq ! (
2870
2870
// Ensure we don't parse leading token
2871
2871
snowflake( )
@@ -2875,3 +2875,6 @@ fn test_parse_double_dot_notation_wrong_position() {
2875
2875
"sql parser error: Expected: identifier, found: ."
2876
2876
) ;
2877
2877
}
2878
+
2879
+ #[ test]
2880
+ fn test_parse_double_dot_notation_wrong_position ( ) { }
You can’t perform that action at this time.
0 commit comments