You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/03/26 06:50:53 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #28029: [SPARK-31261][SQL] Avoid npe when reading bad csv input with `columnNameCorruptRecord` specified

HyukjinKwon commented on a change in pull request #28029: [SPARK-31261][SQL] Avoid npe when reading bad csv input with `columnNameCorruptRecord` specified
URL: https://github.com/apache/spark/pull/28029#discussion_r398349066
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala
 ##########
 @@ -1895,6 +1895,13 @@ abstract class CSVSuite extends QueryTest with SharedSparkSession with TestCsvDa
     checkAnswer(spark.read.schema(schema).csv(input), Row(null))
     checkAnswer(spark.read.option("multiLine", true).schema(schema).csv(input), Row(null))
     assert(spark.read.csv(input).collect().toSet == Set(Row()))
+
+    val schemaWithCorruptField = schema.add("_corrupt_record", StringType)
 
 Review comment:
   @wzhfy, what about making this as a separate test with the prefix of 'SPARK-31261' in its test name? It would be easier to track.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org