cfmcgrady commented on code in PR #36435:
URL: https://github.com/apache/spark/pull/36435#discussion_r865524477
##########
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala:
##########
@@ -2693,6 +2693,16 @@ abstract class CSVSuite
assert(df.schema == expected)
checkAnswer(df, Row(1, null) :: Nil)
}
+
+
withSQLConf(SQLConf.LEGACY_RESPECT_NULLABILITY_IN_TEXT_DATASET_CONVERSION.key
-> "true") {
+ checkAnswer(
+ spark.read.schema(
+ StructType(
+ StructField("f1", StringType, nullable = false) ::
+ StructField("f2", StringType, nullable = false) :: Nil)
+ ).option("mode", "DROPMALFORMED").csv(Seq("a,", "a,b").toDS),
Review Comment:
Shall we also add a test case for `"FAILFAST/PERMISSIVE"` mode? The behavior
is different in the legacy conversion.
--
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]