HyukjinKwon commented on a change in pull request #31026:
URL: https://github.com/apache/spark/pull/31026#discussion_r552400188
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -2150,9 +2150,6 @@ class Analyzer(override val catalogManager:
CatalogManager)
lead.copy(ignoreNulls = ignoreNulls)
case lag: Lag =>
lag.copy(ignoreNulls = ignoreNulls)
- case _ =>
- throw
QueryCompilationErrors.functionWithUnsupportedSyntaxError(
- owf.prettyName, "IGNORE NULLS")
Review comment:
I think that the complier misses several cases to be honest (see
https://github.com/apache/spark/pull/30923/files#diff-aad995a1ccfd7ca8e2a4c7bdf5114ddda8f9017e56cf8c60bb63846b3b5f3153R48-R50
as an example).
But I got that it's easier just to trust complier for maintenance.
Either way works to me since the complier doesn't complain for now.
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -2150,9 +2150,6 @@ class Analyzer(override val catalogManager:
CatalogManager)
lead.copy(ignoreNulls = ignoreNulls)
case lag: Lag =>
lag.copy(ignoreNulls = ignoreNulls)
- case _ =>
- throw
QueryCompilationErrors.functionWithUnsupportedSyntaxError(
- owf.prettyName, "IGNORE NULLS")
Review comment:
For example, we could implement some new expression that implements
`FrameLessOffsetWindowFunction` later (in the same file), and we forgot to fix
it here that ends up with a raw case match error. I mean "match may not be
exhaustive" warning .. like we fixed it
https://github.com/apache/spark/pull/30455 before.
Or does it not show the warning in this case because we're using `sealed`?
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -2150,9 +2150,6 @@ class Analyzer(override val catalogManager:
CatalogManager)
lead.copy(ignoreNulls = ignoreNulls)
case lag: Lag =>
lag.copy(ignoreNulls = ignoreNulls)
- case _ =>
- throw
QueryCompilationErrors.functionWithUnsupportedSyntaxError(
- owf.prettyName, "IGNORE NULLS")
Review comment:
Hm, but I thought we should keep the default match here. If `sealed`
requires to remove the default match here, we shouldn't do that.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]