You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/12/27 10:34:20 UTC
[GitHub] [spark] zhengruifeng commented on a diff in pull request #39240: [SPARK-41440][CONNECT][PYTHON] Avoid the cache operator for general Sample.
zhengruifeng commented on code in PR #39240:
URL: https://github.com/apache/spark/pull/39240#discussion_r1057593107
##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala:
##########
@@ -178,8 +178,9 @@ class SparkConnectPlanner(session: SparkSession) {
* wrap such fields into proto messages.
*/
private def transformSample(rel: proto.Sample): LogicalPlan = {
- val input = Dataset.ofRows(session, transformRelation(rel.getInput))
- val plan = if (rel.getForceStableSort) {
+ val plan = if (rel.getDeterministicOrder) {
Review Comment:
`deterministic_order` is optional, so maybe
```suggestion
val plan = if (rel.hasDeterministicOrder && rel.getDeterministicOrder) {
```
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org