Commit f423885
[SPARK-52060][SQL] Make
### What changes were proposed in this pull request?
creates a new OneRowRelationExec node, which is more or less a copy of the RDDScanExec node.
We want a dedicated node because this helps make it more clear when a one row relation, i.e. for patterns like `SELECT version()` is used.
### Why are the changes needed?
this makes it more clear in the code that a one row relation is used and allows us to avoid checking the hard coded "OneRowRelation" string when pattern matching.
### Does this PR introduce _any_ user-facing change?
yes, the plan will now be `OneRowRelationExec` rather than `RDDScanExec`. The plan string should be the same, however.
### How was this patch tested?
added UTs
### Was this patch authored or co-authored using generative AI tooling?
Closes apache#50849 from richardc-db/make_one_row_relation_node.
Lead-authored-by: Richard Chen <r.chen@databricks.com>
Co-authored-by: Wenchen Fan <cloud0fan@gmail.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>OneRowRelationExec node1 parent d152ae8 commit f423885
4 files changed
Lines changed: 58 additions & 4 deletions
File tree
- sql/core/src
- main/scala/org/apache/spark/sql/execution
- test/scala/org/apache/spark/sql
Lines changed: 43 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
Lines changed: 1 addition & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
690 | 690 | | |
691 | 691 | | |
692 | 692 | | |
693 | | - | |
694 | | - | |
695 | 693 | | |
696 | 694 | | |
697 | 695 | | |
| |||
1054 | 1052 | | |
1055 | 1053 | | |
1056 | 1054 | | |
1057 | | - | |
| 1055 | + | |
1058 | 1056 | | |
1059 | 1057 | | |
1060 | 1058 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| 59 | + | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
| |||
Lines changed: 13 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
4962 | 4962 | | |
4963 | 4963 | | |
4964 | 4964 | | |
| 4965 | + | |
| 4966 | + | |
| 4967 | + | |
| 4968 | + | |
| 4969 | + | |
| 4970 | + | |
| 4971 | + | |
| 4972 | + | |
| 4973 | + | |
| 4974 | + | |
| 4975 | + | |
| 4976 | + | |
4965 | 4977 | | |
4966 | 4978 | | |
4967 | 4979 | | |
0 commit comments