File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Expand file tree Collapse file tree 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> {
83518351 loop {
83528352 if self.dialect.supports_object_name_double_dot_notation()
83538353 && idents.len() == 1
8354- && self.peek_token() == Token::Period
8354+ && self.consume_token(& Token::Period)
83558355 {
8356- self.next_token();
8356+ // Empty string here means default schema
83578357 idents.push(Ident::new(""));
83588358 }
83598359 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() {
28512851fn test_sf_double_dot_notation ( ) {
28522852 snowflake ( ) . verified_stmt ( "SELECT * FROM db_name..table_name" ) ;
28532853 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 ( ) { }
28582854
2859- #[ test]
2860- fn test_parse_double_dot_notation_wrong_position ( ) {
28612855 assert_eq ! (
28622856 snowflake( )
28632857 . parse_sql_statements( "SELECT * FROM X.Y.." )
28642858 . unwrap_err( )
28652859 . to_string( ) ,
28662860 "sql parser error: Expected: identifier, found: ."
28672861 ) ;
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+ ) ;
28692869 assert_eq ! (
28702870 // Ensure we don't parse leading token
28712871 snowflake( )
@@ -2875,3 +2875,6 @@ fn test_parse_double_dot_notation_wrong_position() {
28752875 "sql parser error: Expected: identifier, found: ."
28762876 ) ;
28772877}
2878+
2879+ #[ test]
2880+ fn test_parse_double_dot_notation_wrong_position ( ) { }
You can’t perform that action at this time.
0 commit comments