Commit bbc887b
[SPARK-33089][SQL] make avro format propagate Hadoop config from DS options to underlying HDFS file system
### What changes were proposed in this pull request?
In `AvroUtils`'s `inferSchema()`, propagate Hadoop config from DS options to underlying HDFS file system.
### Why are the changes needed?
There is a bug that when running:
```scala
spark.read.format("avro").options(conf).load(path)
```
The underlying file system will not receive the `conf` options.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
unit test added
Closes #29971 from yuningzh-db/avro_options.
Authored-by: Yuning Zhang <[email protected]>
Signed-off-by: HyukjinKwon <[email protected]>1 parent 39510b0 commit bbc887b
File tree
2 files changed
+11
-1
lines changed- external/avro/src
- main/scala/org/apache/spark/sql/avro
- test/scala/org/apache/spark/sql/avro
2 files changed
+11
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1802 | 1802 | | |
1803 | 1803 | | |
1804 | 1804 | | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
| 1809 | + | |
| 1810 | + | |
| 1811 | + | |
| 1812 | + | |
| 1813 | + | |
| 1814 | + | |
1805 | 1815 | | |
1806 | 1816 | | |
1807 | 1817 | | |
| |||
0 commit comments