panbingkun commented on code in PR #45958:
URL: https://github.com/apache/spark/pull/45958#discussion_r1557725588
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVHeaderChecker.scala:
##########
@@ -75,22 +75,24 @@ class CSVHeaderChecker(
// scalastyle:on caselocale
}
if (nameInHeader != nameInSchema) {
+ // scalastyle:off line.size.limit
errorMessage = Some(
Review Comment:
- The original message `format` is as follows:
```
Map("msg" -> "CSV header does not conform to the schema.
Header: columnA, columnB
Schema: columnB, columnA
Expected: columnB but found: columnA
CSV source: [value: string]")
```
- After https://github.com/apache/spark/pull/45904, the message `format` is
as follow:
```
Map("msg" -> "CSV header does not conform to the schema.
Header: columnA, columnB
Schema: columnB, columnA
Expected: columnB
but found: columnA
CSV source: [value: string]")
```
<img width="790" alt="image"
src="https://github.com/apache/spark/assets/15246973/d379dac8-6b91-4d09-b143-4884236d3870">
If the corresponding UT is modified, it can be passed, but the modified
format after https://github.com/apache/spark/pull/45904 seems to go against the
`original intention` and is not particularly `reasonable`
--
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]