-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-53402][CONNECT] Support Direct Passthrough Partitioning Dataset API in Spark Connect in Scala #52242
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
Closed
shujingyang-db
wants to merge
13
commits into
apache:master
from
shujingyang-db:direct-shuffle-partition-id-connect
Closed
[SPARK-53402][CONNECT] Support Direct Passthrough Partitioning Dataset API in Spark Connect in Scala #52242
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
a49b11e
init
shujingyang-db 575762e
ckp
shujingyang-db f899c95
ckp
shujingyang-db 411272b
clean up
shujingyang-db 9ba876a
clean up
shujingyang-db 8c93994
add golden files
shujingyang-db f515447
generate python files
shujingyang-db b5d090f
add mima tests
shujingyang-db 97b32fc
lint
shujingyang-db 72bf019
fix test
shujingyang-db a2f9317
fix
shujingyang-db 0b7c655
fix
shujingyang-db 633dbb8
add server side files
shujingyang-db File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
sql/connect/common/src/test/resources/query-tests/explain-results/repartitionById.explain
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| RepartitionByExpression [direct_shuffle_partition_id(cast(id#0L as int))], 10 | ||
| +- LocalRelation <empty>, [id#0L, a#0, b#0] |
67 changes: 67 additions & 0 deletions
67
sql/connect/common/src/test/resources/query-tests/queries/repartitionById.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| { | ||
| "common": { | ||
| "planId": "1" | ||
| }, | ||
| "repartitionByExpression": { | ||
| "input": { | ||
| "common": { | ||
| "planId": "0" | ||
| }, | ||
| "localRelation": { | ||
| "schema": "struct\u003cid:bigint,a:int,b:double\u003e" | ||
| } | ||
| }, | ||
| "partitionExprs": [{ | ||
| "directShufflePartitionId": { | ||
| "child": { | ||
| "cast": { | ||
| "expr": { | ||
| "unresolvedAttribute": { | ||
| "unparsedIdentifier": "id" | ||
| }, | ||
| "common": { | ||
| "origin": { | ||
| "jvmOrigin": { | ||
| "stackTrace": [{ | ||
| "classLoaderName": "app", | ||
| "declaringClass": "org.apache.spark.sql.functions$", | ||
| "methodName": "col", | ||
| "fileName": "functions.scala" | ||
| }, { | ||
| "classLoaderName": "app", | ||
| "declaringClass": "org.apache.spark.sql.PlanGenerationTestSuite", | ||
| "methodName": "~~trimmed~anonfun~~", | ||
| "fileName": "PlanGenerationTestSuite.scala" | ||
| }] | ||
| } | ||
| } | ||
| } | ||
| }, | ||
| "type": { | ||
| "integer": { | ||
| } | ||
| } | ||
| }, | ||
| "common": { | ||
| "origin": { | ||
| "jvmOrigin": { | ||
| "stackTrace": [{ | ||
| "classLoaderName": "app", | ||
| "declaringClass": "org.apache.spark.sql.Column", | ||
| "methodName": "cast", | ||
| "fileName": "Column.scala" | ||
| }, { | ||
| "classLoaderName": "app", | ||
| "declaringClass": "org.apache.spark.sql.PlanGenerationTestSuite", | ||
| "methodName": "~~trimmed~anonfun~~", | ||
| "fileName": "PlanGenerationTestSuite.scala" | ||
| }] | ||
| } | ||
| } | ||
| } | ||
| } | ||
| } | ||
| }], | ||
| "numPartitions": 10 | ||
| } | ||
| } |
Binary file added
BIN
+426 Bytes
sql/connect/common/src/test/resources/query-tests/queries/repartitionById.proto.bin
Binary file not shown.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not implement it in sql/api ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1, the API should be added in https://github.com/apache/spark/blob/b4faf063e37597cf09b9e210766972303fbebe94/sql/api/src/main/scala/org/apache/spark/sql/Dataset.scala