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 @@ -8384,9 +8384,9 @@ impl<'a> Parser<'a> {
8384
8384
loop {
8385
8385
if self.dialect.supports_object_name_double_dot_notation()
8386
8386
&& idents.len() == 1
8387
- && self.peek_token() == Token::Period
8387
+ && self.consume_token(& Token::Period)
8388
8388
{
8389
- self.next_token();
8389
+ // Empty string here means default schema
8390
8390
idents.push(Ident::new(""));
8391
8391
}
8392
8392
idents.push(self.parse_identifier(in_table_clause)?);
Original file line number Diff line number Diff line change @@ -2869,21 +2869,21 @@ fn test_projection_with_nested_trailing_commas() {
2869
2869
fn test_sf_double_dot_notation ( ) {
2870
2870
snowflake ( ) . verified_stmt ( "SELECT * FROM db_name..table_name" ) ;
2871
2871
snowflake ( ) . verified_stmt ( "SELECT * FROM x, y..z JOIN a..b AS b ON x.id = b.id" ) ;
2872
- }
2873
-
2874
- #[ test]
2875
- fn test_sf_double_dot_notation_wrong_position ( ) { }
2876
2872
2877
- #[ test]
2878
- fn test_parse_double_dot_notation_wrong_position ( ) {
2879
2873
assert_eq ! (
2880
2874
snowflake( )
2881
2875
. parse_sql_statements( "SELECT * FROM X.Y.." )
2882
2876
. unwrap_err( )
2883
2877
. to_string( ) ,
2884
2878
"sql parser error: Expected: identifier, found: ."
2885
2879
) ;
2886
-
2880
+ assert_eq ! (
2881
+ snowflake( )
2882
+ . parse_sql_statements( "SELECT * FROM X..Y..Z" )
2883
+ . unwrap_err( )
2884
+ . to_string( ) ,
2885
+ "sql parser error: Expected: identifier, found: ."
2886
+ ) ;
2887
2887
assert_eq ! (
2888
2888
// Ensure we don't parse leading token
2889
2889
snowflake( )
@@ -2893,3 +2893,6 @@ fn test_parse_double_dot_notation_wrong_position() {
2893
2893
"sql parser error: Expected: identifier, found: ."
2894
2894
) ;
2895
2895
}
2896
+
2897
+ #[ test]
2898
+ fn test_parse_double_dot_notation_wrong_position ( ) { }
You can’t perform that action at this time.
0 commit comments