grundprinzip commented on code in PR #38275:
URL: https://github.com/apache/spark/pull/38275#discussion_r997384334
##########
connector/connect/src/main/scala/org/apache/spark/sql/connect/planner/SparkConnectPlanner.scala:
##########
@@ -173,10 +174,16 @@ class SparkConnectPlanner(plan: proto.Relation, session:
SparkSession) {
}
}
- private def transformFetch(limit: proto.Fetch): LogicalPlan = {
+ private def transformLimit(limit: proto.Limit): LogicalPlan = {
logical.Limit(
- child = transformRelation(limit.getInput),
- limitExpr = expressions.Literal(limit.getLimit, IntegerType))
+ limitExpr = expressions.Literal(limit.getLimit, IntegerType),
+ transformRelation(limit.getInput))
+ }
+
+ private def transformOffset(offset: proto.Offset): LogicalPlan = {
+ Offset(
Review Comment:
please use `logical.Offset` to make sure where it comes from similar to the
`proto.Offset`
##########
connector/connect/src/main/protobuf/spark/connect/relations.proto:
##########
@@ -37,10 +37,11 @@ message Relation {
Join join = 5;
Union union = 6;
Sort sort = 7;
- Fetch fetch = 8;
+ Limit limit = 8;
Aggregate aggregate = 9;
SQL sql = 10;
LocalRelation local_relation = 11;
+ Offset offset = 13;
Review Comment:
Why two relations?
--
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]