peter-toth commented on a change in pull request #27454: [SPARK-28228][SQL]
Change the default behavior for name conflict in nested WITH clause
URL: https://github.com/apache/spark/pull/27454#discussion_r376701418
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -2077,9 +2077,11 @@ object SQLConf {
val LEGACY_CTE_PRECEDENCE_ENABLED =
buildConf("spark.sql.legacy.ctePrecedence.enabled")
.internal()
- .doc("When true, outer CTE definitions takes precedence over inner
definitions.")
+ .doc("When true, outer CTE definitions takes precedence over inner
definitions. If set to " +
+ "false, inner CTE definitions take precedence. The default value is
empty, which keep the " +
Review comment:
I'm not sure how exact and detailed this description needs to be, but
- if it is set to `false` then an inner CTE always takes precedence,
- if it is set to `true` then it complies with the (bit weird) 2.4
behaviour, where an outer CTE takes precedence in almost all of the cases (ie.
inner CTE is in another CTE definition or in a subquery expression), except for
the case where inner CTE is in a subquery.
----------------------------------------------------------------
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]