Github user MaxGekk commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20959#discussion_r180529086
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala
 ---
    @@ -1279,4 +1279,45 @@ class CSVSuite extends QueryTest with 
SharedSQLContext with SQLTestUtils {
           Row("0,2013-111-11 12:13:14") :: Row(null) :: Nil
         )
       }
    +
    +  test("SPARK-23846: schema inferring touches less data if samplingRation 
< 1.0") {
    +    val predefinedSample = Set[Int](2, 8, 15, 27, 30, 34, 35, 37, 44, 46,
    +      57, 62, 68, 72)
    --- End diff --
    
    Sampling of 100 elements return 13 elements, if it is called with 
`withReplacement` = `false` and `seed` = `1` . The test fails if I select only 
10 elements. I took the same values for  `withReplacement` and `seed` as in 
JSON datasource.


---

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

Reply via email to