amaliujia commented on code in PR #37750:
URL: https://github.com/apache/spark/pull/37750#discussion_r961901392
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/errors/QueryCompilationErrors.scala:
##########
@@ -1821,6 +1823,23 @@ private[sql] object QueryCompilationErrors extends
QueryErrorsBase {
new AnalysisException(s"Table or view not found: $table")
}
+ def noSuchFunctionError(
Review Comment:
I see why it makes sense to merge the SELECT DISTINCT hint with existing
undefined function error message.
The difference comes from how to propose a new error class where we have to
think about the scenario: why this happen, what could be the root cause, what
are the mitigations.
This way of thinking differs both scenarios:
1. distinct could be wrong usage of deduplicating arguments or
catalog.db.distinct not exist or users use a wrong name for the registered
function (the one to use might be `distincy` etc.
2. undefined function is fun(x) not found, very clear.
I see there is some overlaps. But the scenarios have difference if we dive
into it.
--
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]