cloud-fan commented on code in PR #48748:
URL: https://github.com/apache/spark/pull/48748#discussion_r1842112533
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala:
##########
@@ -2216,21 +2216,25 @@ class Analyzer(override val catalogManager:
CatalogManager) extends RuleExecutor
numArgs: Int,
u: UnresolvedFunction): Expression = {
func match {
- case owg: SupportsOrderingWithinGroup if u.isDistinct =>
+ case owg: InverseDistributionFunction if u.isDistinct =>
throw
QueryCompilationErrors.distinctInverseDistributionFunctionUnsupportedError(
owg.prettyName)
- case owg: SupportsOrderingWithinGroup
+ case owg: InverseDistributionFunction
if !owg.orderingFilled && u.orderingWithinGroup.isEmpty =>
Review Comment:
I'm in favor of the flag approach as it's easier to understand. e.g. we can
add `def allowsDistinct`, `def allowsEmptyOrdering` in
`SupportsOrderingWithinGroup`.
We need to improve the error message a little bit. We should say `inverse
distribution function 'percentile_cont' does not support DISTINCT` which
provides the function name, so that it indicates that other inverse
distribution functions may still support DISTINCT.
--
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]