Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPARK-38391][SPARK-38768][SQL][FOLLOWUP] Add comments for pushLimit and pushTopN of PushDownUtils #36092

Closed
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,11 @@ object PushDownUtils extends PredicateHelper {
}

/**
* Pushes down LIMIT to the data source Scan
* Pushes down LIMIT to the data source Scan.
*
* @return the tuple of Boolean. The first Boolean value represents whether to push down, and
* the second Boolean value represents whether to push down partially which means to
* keep the `Limit`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we be a little more clear and say something like
...the second Boolean value represents whether to push down partially, which means Spark will keep the Limit and do it again.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

*/
def pushLimit(scanBuilder: ScanBuilder, limit: Int): (Boolean, Boolean) = {
scanBuilder match {
Expand All @@ -127,7 +131,11 @@ object PushDownUtils extends PredicateHelper {
}

/**
* Pushes down top N to the data source Scan
* Pushes down top N to the data source Scan.
*
* @return the tuple of Boolean. The first Boolean value represents whether to push down, and
* the second Boolean value represents whether to push down partially which means to
* keep the `Sort` and `Limit`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment as the above

*/
def pushTopN(
scanBuilder: ScanBuilder,
Expand Down