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/09/23 16:14:44 UTC

[GitHub] [spark] cloud-fan commented on a change in pull request #34057: [SPARK-36825][SQL] Read/write dataframes with ANSI intervals from/to parquet files

cloud-fan commented on a change in pull request #34057:
URL: https://github.com/apache/spark/pull/34057#discussion_r714953537



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala
##########
@@ -577,8 +579,11 @@ case class DataSource(
       checkEmptyGlobPath, checkFilesExist, enableGlobbing = globPaths)
   }
 
-  private def disallowWritingIntervals(dataTypes: Seq[DataType]): Unit = {
-    dataTypes.foreach(TypeUtils.invokeOnceForInterval(_) {
+  private def disallowWritingIntervals(
+      dataTypes: Seq[DataType],
+      forbidAnsiIntervals: Boolean): Unit = {
+    val isParquet = providingClass == classOf[ParquetFileFormat]

Review comment:
       I'm OK with this, but it's better if we can delegate the type support check to the `FileFormat` implementations. Then here we can allow ansi interval types for all file formats.




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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

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