Commit 6139773
committed
### What changes were proposed in this pull request?
This PR aims to support `xml` API in `DataFrameReader` and `DataFrameWriter`.
### Why are the changes needed?
`xml` API is newly added at `Apache Spark 4.0.0`. We had better support this for the feature parity.
https://github.com/apache/spark/blob/e0801d9d8e33cd8835f3e3beed99a3588c16b776/sql/api/src/main/scala/org/apache/spark/sql/DataFrameReader.scala#L394-L403
```scala
/**
* Loads a XML file and returns the result as a `DataFrame`. See the documentation on the other
* overloaded `xml()` method for more details.
*
* since 4.0.0
*/
def xml(path: String): DataFrame = {
// This method ensures that calls that explicit need single argument works, see SPARK-16009
xml(Seq(path): _*)
}
```
### Does this PR introduce _any_ user-facing change?
No, this is a new addition.
### How was this patch tested?
Pass the CIs.
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #53 from dongjoon-hyun/SPARK-51784.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
1 parent 00f2b47 commit 6139773
File tree
4 files changed
+43
-0
lines changed- Sources/SparkConnect
- Tests/SparkConnectTests
4 files changed
+43
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
160 | 160 | | |
161 | 161 | | |
162 | 162 | | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
163 | 179 | | |
164 | 180 | | |
165 | 181 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
174 | 182 | | |
175 | 183 | | |
176 | 184 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
48 | 58 | | |
49 | 59 | | |
50 | 60 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
46 | 55 | | |
47 | 56 | | |
48 | 57 | | |
| |||
0 commit comments