Skip to content

Conversation

@yaooqinn
Copy link
Member

@yaooqinn yaooqinn commented May 9, 2025

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

@yaooqinn
Copy link
Member Author

yaooqinn commented May 9, 2025

cc @dongjoon-hyun, thank you in advance

}
}

private[spark] object SerializableConfiguration {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@dongjoon-hyun dongjoon-hyun changed the title [SPARK-52052][CORE] Add .broadcast in the companion object of SerializableConfiguration [SPARK-52052][CORE] Add .broadcast in the companion object of SerializableConfiguration May 9, 2025
Copy link
Member

@dongjoon-hyun dongjoon-hyun left a 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)
Copy link
Member

@szehon-ho szehon-ho May 13, 2025

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?

Copy link
Member

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 .

HyukjinKwon pushed a commit that referenced this pull request May 15, 2025
### 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]>
yhuang-db pushed a commit to yhuang-db/spark that referenced this pull request Jun 9, 2025
…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]>
yhuang-db pushed a commit to yhuang-db/spark that referenced this pull request Jun 9, 2025
### 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants