mgaido91 commented on a change in pull request #23531: [SPARK-24497][SQL]
Support recursive SQL query
URL: https://github.com/apache/spark/pull/23531#discussion_r321960243
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala
##########
@@ -526,6 +529,62 @@ trait CheckAnalysis extends PredicateHelper {
plan.setAnalyzed()
}
+ /**
+ * Recursion according to SQL standard comes with several limitations due to
the fact that only
+ * those operations are allowed where the new set of rows can be computed
from the result of the
+ * previous iteration. This implies that a recursive reference can't be used
in some kinds of
+ * joins and aggregations.
+ * A further constraint is that a recursive term can contain one recursive
reference only (except
+ * for using it on different sides of a UNION).
+ *
+ * This rules checks that these restrictions are not violated and returns
the original plan.
Review comment:
```suggestion
* This rule checks that these restrictions are not violated and returns
the original plan.
```
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]