FailedChanges

Summary

  1. [SPARK-31261][SQL] Avoid npe when reading bad csv input with (details)
Commit 801d6a92d958f7b9762466e3c6643e54c48eb3a2 by gurwls223
[SPARK-31261][SQL] Avoid npe when reading bad csv input with
`columnNameCorruptRecord` specified
### What changes were proposed in this pull request?
SPARK-25387 avoids npe for bad csv input, but when reading bad csv input
with `columnNameCorruptRecord` specified, `getCurrentInput` is called
and it still throws npe.
### Why are the changes needed?
Bug fix.
### Does this PR introduce any user-facing change?
No.
### How was this patch tested?
Add a test.
Closes #28029 from wzhfy/corrupt_column_npe.
Authored-by: Zhenhua Wang <wzh_zju@163.com> Signed-off-by: HyukjinKwon
<gurwls223@apache.org>
(cherry picked from commit 791d2ba346f3358fc280adbbbe27f2cd50fd3732)
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/UnivocityParser.scala (diff)
The file was modifiedsql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala (diff)