Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/23165#discussion_r237339152
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/FileIndexSuite.scala
 ---
    @@ -49,6 +50,21 @@ class FileIndexSuite extends SharedSQLContext {
         }
       }
     
    +  test("SPARK-26188: don't infer data types of partition columns if user 
specifies schema") {
    +    withTempDir { dir =>
    +      val partitionDirectory = new File(dir, s"a=4d")
    +      partitionDirectory.mkdir()
    +      val file = new File(partitionDirectory, "text.txt")
    +      stringToFile(file, "text")
    +      val path = new Path(dir.getCanonicalPath)
    +      val schema = StructType(Seq(StructField("a", StringType, false)))
    +      val catalog = new InMemoryFileIndex(spark, Seq(path), Map.empty, 
Some(schema))
    --- End diff --
    
    `catalog` ->`fileIndex`


---

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

Reply via email to