yaooqinn commented on a change in pull request #31884: URL: https://github.com/apache/spark/pull/31884#discussion_r597418087
########## File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala ########## @@ -579,6 +573,14 @@ case class DataSource( DataSource.checkAndGlobPathIfNecessary(allPaths.toSeq, newHadoopConfiguration(), checkEmptyGlobPath, checkFilesExist, enableGlobbing = globPaths) } + + private def checkAllowedTypesInWrite(dataTypes: Seq[DataType]): Unit = { + dataTypes.foreach { + case i @ (CalendarIntervalType | DayTimeIntervalType | YearMonthIntervalType) => Review comment: There also a method here`org.apache.spark.sql.catalyst.util.TypeUtils.failWithIntervalType`, maybe we can merge them together ########## File path: sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/DataSource.scala ########## @@ -579,6 +573,14 @@ case class DataSource( DataSource.checkAndGlobPathIfNecessary(allPaths.toSeq, newHadoopConfiguration(), checkEmptyGlobPath, checkFilesExist, enableGlobbing = globPaths) } + + private def checkAllowedTypesInWrite(dataTypes: Seq[DataType]): Unit = { + dataTypes.foreach { + case i @ (CalendarIntervalType | DayTimeIntervalType | YearMonthIntervalType) => Review comment: There's also a method here`org.apache.spark.sql.catalyst.util.TypeUtils.failWithIntervalType`, maybe we can merge them together -- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org