@@ -151,44 +151,6 @@ fn test_single_table_in_parenthesis_with_alias() {
151151 ) ;
152152}
153153
154-
155- #[ test]
156- fn parse_select_as_func_argument ( ) {
157- // subquery without parantheses in function call should work
158- snowflake ( ) . one_statement_parses_to (
159- "SELECT parse_json(SELECT column2 FROM values(1, 'null'))" ,
160- "SELECT parse_json((SELECT column2 FROM values(1, 'null')))" ,
161- ) ;
162- // subquery with parantheses in function call should also work
163- snowflake ( ) . one_statement_parses_to (
164- "SELECT parse_json((SELECT column2 FROM values(1, 'null')))" ,
165- "SELECT parse_json((SELECT column2 FROM values(1, 'null')))" ,
166- ) ;
167- // subquery with comma in function call should be interpreted as function with one argument
168- // Ex: func(select 1, 2) === fun((select 1, 2))
169- snowflake ( ) . one_statement_parses_to (
170- "SELECT func(SELECT 1, 2)" ,
171- "SELECT func((SELECT 1, 2))" ,
172- ) ;
173-
174- // subquery starting with WITH should also work
175- snowflake ( ) . one_statement_parses_to (
176- "SELECT func(WITH foo AS (SELECT 1) SELECT 1)" ,
177- "SELECT func((WITH foo AS (SELECT 1) SELECT 1))" ,
178- ) ;
179-
180- // named function arguments should not work
181- let res = snowflake ( ) . parse_sql_statements (
182- "SELECT func(expr => SELECT 1)" ,
183- ) ;
184- assert_eq ! (
185- res. unwrap_err( ) ,
186- ParserError :: ParserError (
187- "SELECT func(expr => SELECT" . to_string( ) ,
188- "Expected ), found: 1" . to_string( )
189- ) ) ;
190- }
191-
192154fn snowflake ( ) -> TestedDialects {
193155 TestedDialects {
194156 dialects : vec ! [ Box :: new( SnowflakeDialect { } ) ] ,
0 commit comments