dtenedor commented on code in PR #41429:
URL: https://github.com/apache/spark/pull/41429#discussion_r1227111940
##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala:
##########
@@ -1412,6 +1412,31 @@ class PlanParserSuite extends AnalysisTest {
assertEqual("select a, b from db.c; ;; ;", table("db", "c").select($"a",
$"b"))
}
+ test("table valued function with named arguments") {
+ // All named arguments
Review Comment:
Can you add some negative test cases that return errors? You can look here
[1] for some examples, and here are some I can think of:
```
select * from my_tvf(arg1 -> 'value1')
select * from my_tvf(arg1 = => 'value1')
select * from my_tvf(arg1 ==> 'value1')
select * from my_tvf((arg1 => 'value1'))
select * from my_tvf(arg1 'value1')
select * from my_tvf(arg1 => )
select * from my_tvf(arg1 => , 42)
select * from my_tvf(my_tvf.arg1 => 'value1')
select * from my_tvf(arg1 => table t1)
select * from my_tvf(group => 'abc')
```
The last one checks that a reserved keyword like `GROUP` or `ORDER` will
work as a named argument name.
[1]
https://github.com/google/zetasql/blob/master/zetasql/parser/testdata/named_arguments.test
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]