Commit ca9c256
committed
[SPARK-54300][PYTHON] Optimize Py4J calls in
### What changes were proposed in this pull request?
Optimize Py4J config calls in df.toPandas
### Why are the changes needed?
In spark connect, we get all configs in a batch; in spark classic, we can do the similar optimization that all configs are fetched in a batch, so that the py4j calls can be minimized.
### Does this PR introduce _any_ user-facing change?
no
### How was this patch tested?
ci
### Was this patch authored or co-authored using generative AI tooling?
no
Closes #52994 from zhengruifeng/py4j_conf_topandas.
Authored-by: Ruifeng Zheng <[email protected]>
Signed-off-by: Ruifeng Zheng <[email protected]>df.toPandas
1 parent c21d5a4 commit ca9c256
File tree
2 files changed
+31
-9
lines changed- python/pyspark/sql/pandas
- sql/catalyst/src/main/scala/org/apache/spark/sql/internal
2 files changed
+31
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
75 | 91 | | |
76 | | - | |
| 92 | + | |
77 | 93 | | |
78 | 94 | | |
79 | 95 | | |
80 | 96 | | |
81 | 97 | | |
82 | 98 | | |
83 | 99 | | |
84 | | - | |
| 100 | + | |
85 | 101 | | |
86 | 102 | | |
87 | | - | |
| 103 | + | |
88 | 104 | | |
89 | 105 | | |
90 | 106 | | |
| |||
112 | 128 | | |
113 | 129 | | |
114 | 130 | | |
115 | | - | |
| 131 | + | |
116 | 132 | | |
117 | 133 | | |
118 | 134 | | |
| |||
148 | 164 | | |
149 | 165 | | |
150 | 166 | | |
151 | | - | |
152 | | - | |
| 167 | + | |
| 168 | + | |
153 | 169 | | |
154 | 170 | | |
155 | 171 | | |
| |||
200 | 216 | | |
201 | 217 | | |
202 | 218 | | |
203 | | - | |
204 | | - | |
| 219 | + | |
| 220 | + | |
205 | 221 | | |
206 | 222 | | |
207 | 223 | | |
| |||
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7886 | 7886 | | |
7887 | 7887 | | |
7888 | 7888 | | |
| 7889 | + | |
| 7890 | + | |
| 7891 | + | |
| 7892 | + | |
| 7893 | + | |
| 7894 | + | |
7889 | 7895 | | |
7890 | 7896 | | |
7891 | 7897 | | |
| |||
0 commit comments