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_r305666988
 
 

 ##########
 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)
 
 Review comment:
   It do need "+1". Without "+1" won't throw exception. Because it do not 
exceed "max" value configured.

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to