gengliangwang commented on code in PR #45904:
URL: https://github.com/apache/spark/pull/45904#discussion_r1556417726
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/CSVHeaderChecker.scala:
##########
@@ -75,19 +75,21 @@ class CSVHeaderChecker(
}
if (nameInHeader != nameInSchema) {
errorMessage = Some(
- s"""|CSV header does not conform to the schema.
- | Header: ${columnNames.mkString(", ")}
- | Schema: ${fieldNames.mkString(", ")}
- |Expected: ${fieldNames(i)} but found: ${columnNames(i)}
- |$source""".stripMargin)
+ log"""|CSV header does not conform to the schema.
+ | Header: ${MDC(COLUMN_NAME, columnNames.mkString(", "))}
Review Comment:
We can't use COLUMN_NAME for 4 different variables...
--
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]