-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-52052][CORE] Add .broadcast in the companion object of SerializableConfiguration
#50844
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
Conversation
…zableConfiguration
|
cc @dongjoon-hyun, thank you in advance |
| } | ||
| } | ||
|
|
||
| private[spark] object SerializableConfiguration { |
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.
Nice!
.broadcast in the companion object of SerializableConfiguration
dongjoon-hyun
left a comment
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, LGTM. Merged to master.
Thank you, @yaooqinn .
| options: Map[String, String], | ||
| hadoopConf: Configuration): PartitionedFile => Iterator[InternalRow] = { | ||
| val broadcastedHadoopConf = | ||
| SerializableConfiguration.broadcast(sparkSession.sparkContext, hadoopConf) |
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.
@yaooqinn @dongjoon-hyun i wonder if the next line can be removed (as its return value is no longer used, so looks like its a wasted side-effect)? I made a pr for it: #50874 , can you check if it makes sense?
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.
Oh, right. Thank you, @szehon-ho .
### What changes were proposed in this pull request? Remove an extra broadcast added in #50844 ### Why are the changes needed? Return value of broadcast is not used, so it seems it is not needed ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Existing tests ### Was this patch authored or co-authored using generative AI tooling? No Closes #50874 from szehon-ho/SPARK-52052-follow. Authored-by: Szehon Ho <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
…alizableConfiguration` ### What changes were proposed in this pull request? Add .broadcast in the companion object of SerializableConfiguration ### Why are the changes needed? - Simplify broadcast logic for SerializableConfiguration - Reduce SparkContext API usage across non-core modules - Bypass IDE type inference issue ### Does this PR introduce _any_ user-facing change? no ### How was this patch tested? Pass GA ### Was this patch authored or co-authored using generative AI tooling? no Closes apache#50844 from yaooqinn/SPARK-52052. Authored-by: Kent Yao <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
### What changes were proposed in this pull request? Remove an extra broadcast added in apache#50844 ### Why are the changes needed? Return value of broadcast is not used, so it seems it is not needed ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Existing tests ### Was this patch authored or co-authored using generative AI tooling? No Closes apache#50874 from szehon-ho/SPARK-52052-follow. Authored-by: Szehon Ho <[email protected]> Signed-off-by: Hyukjin Kwon <[email protected]>
What changes were proposed in this pull request?
Add .broadcast in the companion object of SerializableConfiguration
Why are the changes needed?
Does this PR introduce any user-facing change?
no
How was this patch tested?
Pass GA
Was this patch authored or co-authored using generative AI tooling?
no