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 2019/07/22 03:53:35 UTC

[GitHub] [spark] WeichenXu123 commented on a change in pull request #25184: [SPARK-28431][SQL] Set maximum error message length in CSV datasource's parsing and writing

WeichenXu123 commented on a change in pull request #25184: [SPARK-28431][SQL] Set maximum error message length in CSV datasource's parsing and writing
URL: https://github.com/apache/spark/pull/25184#discussion_r305665816
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala
 ##########
 @@ -2085,4 +2087,28 @@ class CSVSuite extends QueryTest with SharedSQLContext with SQLTestUtils with Te
       }
     }
   }
+
+  test("SPARK-28431: prevent CSV datasource throw TextParsingException with large size message") {
+    withTempDir { dir =>
+      val maxCharsPerCol = 10000
+      val str = "a" * (maxCharsPerCol + 1)
+
+      val csvFile = new File(dir, "data.csv")
+      Files.write(
+        csvFile.toPath,
+        Seq(str).asJava,
 
 Review comment:
   I don't think so, here I need to write a text file, not a binary file.

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