dtenedor commented on PR #48724:
URL: https://github.com/apache/spark/pull/48724#issuecomment-2521013761
@jiashenC sure, it just looks like the `PlanParserSuite` needs to be updated:
```
test("hive-style single-FROM statement") {
assertEqual("from a select b, c", table("a").select($"b", $"c"))
assertEqual(
"from db.a select b, c where d < 1", table("db", "a").where($"d" <
1).select($"b", $"c"))
assertEqual("from a select distinct b, c",
Distinct(table("a").select($"b", $"c")))
// Weird "FROM table" queries, should be invalid anyway
val sql1 = "from a"
checkError(
exception = parseException(sql1),
condition = "PARSE_SYNTAX_ERROR",
parameters = Map("error" -> "end of input", "hint" -> ""))
val sql2 = "from (from a union all from b) c select *"
checkError(
exception = parseException(sql2),
condition = "PARSE_SYNTAX_ERROR",
parameters = Map("error" -> "'union'", "hint" -> ""))
}
```
This could be:
```
test("hive-style single-FROM statement") {
assertEqual("from a select b, c", table("a").select($"b", $"c"))
assertEqual(
"from db.a select b, c where d < 1", table("db", "a").where($"d" <
1).select($"b", $"c"))
assertEqual("from a select distinct b, c",
Distinct(table("a").select($"b", $"c")))
assertEqual("from a", table("a"))
assertEqual("from (from a union all from b) c select *",
table("c").unionAll(table("b")))
}
```
Then the test should pass and we can merge the PR.
--
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]