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 2021/03/17 06:10:15 UTC

[GitHub] [spark] MaxGekk commented on a change in pull request #31858: [SPARK-34768][SQL] Respect the default input buffer size in Univocity

MaxGekk commented on a change in pull request #31858:
URL: https://github.com/apache/spark/pull/31858#discussion_r595736246



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala
##########
@@ -2452,6 +2452,27 @@ abstract class CSVSuite
       assert(result.sameElements(exceptResults))
     }
   }
+
+  test("SPARK-34768: counting a long record with ignoreTrailingWhiteSpace set to true") {
+    val line = "XX   |XXX-XXXX            |XXXXXX              " +
+      "|XXXXXXXX|XXXXX               |XXXXXX              " +
+      "|X|XXXXXXX|XXXXXXXX|XXXX|XXXXXXXXXXXXXXX     |XXXXXXXXXXX" +
+      "|XXXXXX              |XXXXXXXXXXXXXXXXXXXXXX|XXXXXX              " +
+      "|XXXXXXXXXXXXXX|XXXXXX              |XXXXXXXXXXXXXXXXXXXXXX" +
+      "|XXXXXX              |XXXXXXXXXXXXXXXXXXXXXX|XXXXXX              " +
+      "|XXXXXXXXX|XXXXXX              |XXXXXXX|                    " +
+      "||                    ||                    " +
+      "||                    ||XXXX-XX-XX XX:XX:XX.XXXXXXX" +
+      "||XXXXX.XXXXXXXXXXXXXXX|XXXXX.XXXXXXXXXXXXXX" +
+      "|XXXXX.XXXXXXXXXXXXXXX|X|XXXXXX              |X"
+    withTempPath { path =>
+      Seq(line).toDF.write.text(path.getAbsolutePath)
+      assert(spark.read.format("csv")
+        .option("delimiter", "|")
+        .option("inferSchema", "true")

Review comment:
       Do you need this?




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



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