cloud-fan commented on code in PR #41564:
URL: https://github.com/apache/spark/pull/41564#discussion_r1233768036


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/UnivocityParser.scala:
##########
@@ -52,7 +52,8 @@ class UnivocityParser(
     requiredSchema: StructType,
     val options: CSVOptions,
     filters: Seq[Filter]) extends Logging {
-  require(requiredSchema.toSet.subsetOf(dataSchema.toSet),
+  require(requiredSchema.toSet.subsetOf(
+    CharVarcharUtils.removeCharVarcharTypeStringMetadataKey(dataSchema).toSet),

Review Comment:
   instead of removing the metadata key, shall we restore the actual schema 
(with char/varchar type present) before checking?



-- 
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]

Reply via email to