Commit 37f8df4
[SPARK-53507][CORE] Don't use case class for BreakingChangeInfo
### What changes were proposed in this pull request?
Don't use a Scala case class for BreakingChangeInfo and MitigationConfig
### Why are the changes needed?
Per comment: #52256 (comment)
> [cloud-fan](https://github.com/cloud-fan) [5 days ago](#52256 (comment))
> I just realize that we expose it as a public API via SparkThrowable.getBreakingChangeInfo. We shouldn't expose a case class as public API as it has a wide API surface, including the companion object.
> We should follow SparkThrowable and define it in Java.
### Does this PR introduce _any_ user-facing change?
No -- interface is almost the same
### How was this patch tested?
Updated unit tests
### Was this patch authored or co-authored using generative AI tooling?
Used Github co-pilot, mainly for the `equals` and `hashCode` functions
Closes #52484 from imarkowitz/ian/breaking-changes-case-class.
Lead-authored-by: imarkowitz <ian.markowitz@databricks.com>
Co-authored-by: Wenchen Fan <cloud0fan@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>1 parent ce3437a commit 37f8df4
File tree
3 files changed
+44
-14
lines changed- common/utils/src/main/scala/org/apache/spark
- core/src/test/scala/org/apache/spark
- sql/connect/server/src/test/scala/org/apache/spark/sql/connect/service
3 files changed
+44
-14
lines changedLines changed: 36 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
211 | 227 | | |
212 | 228 | | |
213 | 229 | | |
214 | 230 | | |
215 | 231 | | |
216 | 232 | | |
217 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
218 | 248 | | |
219 | 249 | | |
220 | 250 | | |
| |||
Lines changed: 5 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
573 | | - | |
| 573 | + | |
574 | 574 | | |
575 | | - | |
576 | | - | |
| 575 | + | |
| 576 | + | |
577 | 577 | | |
578 | 578 | | |
579 | 579 | | |
| |||
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
585 | | - | |
| 585 | + | |
586 | 586 | | |
587 | | - | |
| 587 | + | |
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
291 | 291 | | |
292 | 292 | | |
293 | 293 | | |
294 | | - | |
| 294 | + | |
295 | 295 | | |
296 | | - | |
| 296 | + | |
297 | 297 | | |
298 | 298 | | |
299 | 299 | | |
| |||
342 | 342 | | |
343 | 343 | | |
344 | 344 | | |
345 | | - | |
| 345 | + | |
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| |||
0 commit comments