zhengruifeng commented on code in PR #38799:
URL: https://github.com/apache/spark/pull/38799#discussion_r1036906761
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -2568,6 +2568,17 @@ object SQLConf {
.intConf
.createWithDefault(SHUFFLE_SPILL_NUM_ELEMENTS_FORCE_SPILL_THRESHOLD.defaultValue.get)
+ val WINDOW_GROUP_LIMIT_THRESHOLD =
+ buildConf("spark.sql.window.group.limit.threshold")
+ .internal()
+ .doc("Threshold for filter the dataset by the window group limit before"
+
+ " window-based top-k computation. By setting this value to -1 window
group limit can be" +
+ " disabled.")
+ .version("3.4.0")
+ .intConf
+ .checkValue(_ >= -1, "The threshold of window group limit must be 0 or
positive integer.")
Review Comment:
```suggestion
.checkValue(limit => limit == -1 || limit > 0, "The threshold of
window group limit must be -1 or positive integer.")
```
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -2568,6 +2568,17 @@ object SQLConf {
.intConf
.createWithDefault(SHUFFLE_SPILL_NUM_ELEMENTS_FORCE_SPILL_THRESHOLD.defaultValue.get)
+ val WINDOW_GROUP_LIMIT_THRESHOLD =
+ buildConf("spark.sql.window.group.limit.threshold")
+ .internal()
+ .doc("Threshold for filter the dataset by the window group limit before"
+
+ " window-based top-k computation. By setting this value to -1 window
group limit can be" +
+ " disabled.")
+ .version("3.4.0")
+ .intConf
+ .checkValue(_ >= -1, "The threshold of window group limit must be 0 or
positive integer.")
Review Comment:
are we going to enable it by default?
--
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]