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

    https://github.com/apache/spark/pull/22611#discussion_r222167078
  
    --- Diff: 
external/avro/src/test/scala/org/apache/spark/sql/avro/AvroSuite.scala ---
    @@ -342,6 +342,53 @@ class AvroSuite extends QueryTest with 
SharedSQLContext with SQLTestUtils {
         }
       }
     
    +  private def createDummyCorruptFile(dir: File): Unit = {
    +    FileUtils.forceMkdir(dir)
    +    val corruptFile = new File(dir, "corrupt.avro")
    +    val writer = new BufferedWriter(new FileWriter(corruptFile))
    +    writer.write("corrupt")
    +    writer.close()
    --- End diff --
    
    ditto for `tryWithResource`


---

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

Reply via email to