dilipbiswal commented on code in PR #55682:
URL: https://github.com/apache/spark/pull/55682#discussion_r3220910845


##########
sql/connect/common/src/main/scala/org/apache/spark/sql/connect/Dataset.scala:
##########
@@ -421,6 +422,51 @@ class Dataset[T] private[sql] (
     lateralJoin(right, Some(joinExprs), joinType)
   }
 
+  private def nearestByJoinImpl(
+      right: sql.Dataset[_],
+      rankingExpression: Column,
+      numResults: Int,
+      joinType: String,
+      mode: String,
+      direction: String): DataFrame = {
+    // Validate locally so Connect users see the same errors as the classic 
path without a
+    // server round-trip. Acceptance lists must stay aligned with 
`NearestByJoinType` /
+    // `NearestByJoinMode` / `NearestByDirection` in sql/catalyst, which 
`sql/connect/common`
+    // cannot import.

Review Comment:
   Done



##########
sql/connect/common/src/main/protobuf/spark/connect/relations.proto:
##########
@@ -1276,3 +1277,33 @@ message LateralJoin {
   // (Required) The join type.
   Join.JoinType join_type = 4;
 }
+
+// Relation of type [[NearestByJoin]].
+//
+// For each row on the left side, returns up to `num_results` rows from the 
right side ordered
+// by `ranking_expression`.

Review Comment:
   Done



-- 
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]

Reply via email to