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

    https://github.com/apache/spark/pull/21667#discussion_r199999766
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileFormat.scala
 ---
    @@ -152,6 +152,12 @@ trait FileFormat {
         }
       }
     
    +  /**
    +   * Validate the given [[DataType]] in read/write path for this file 
format.
    +   * If the [[DataType]] is not supported, an exception will be thrown.
    +   * By default all data types are supported.
    +   */
    +  def validateDataType(dataType: DataType, isReadPath: Boolean): Unit = {}
    --- End diff --
    
    Yes, that was what I did in first commit.  If the unsupported type is 
inside struct/array, then the error message is not accurate as the current way.
    I am OK with revert to return Boolean though.


---

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

Reply via email to