panbingkun opened a new pull request, #41564:
URL: https://github.com/apache/spark/pull/41564
### What changes were proposed in this pull request?
The pr aims to fix CSV Table Read Error with CharType(length) column.
### Why are the changes needed?
Fix bug as follows:
- CREATE TABLE csv_bug (name STRING, age INT, job CHAR(4)) USING CSV OPTIONS
('header' = 'true', 'sep' = ';') LOCATION
"/opt/spark/examples/src/main/resources/people.csv";
- SELECT * FROM csv_bug;
- ERROR Executor: Exception in task 0.0 in stage 0.0 (TID 0)
java.lang.IllegalArgumentException: requirement failed: requiredSchema
(struct<name:string,age:int,job:string>) should be the subset of dataSchema
(struct<name:string,age:int,job:string>).
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
- Pass GA.
- Add new UT.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]