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/21 14:24:10 UTC

[GitHub] [spark] MaxGekk opened a new pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

MaxGekk opened a new pull request #34057:
URL: https://github.com/apache/spark/pull/34057


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error type or message, please read the guideline first in
        'core/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   


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


[GitHub] [spark] AmplabJenkins commented on pull request #34057: [WIP][SPARK-36825][SQL] Read/write dataframes with ANSI intervals from/to parquet files

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924838460


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143501/
   


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


[GitHub] [spark] MaxGekk closed pull request #34057: [SPARK-36825][SQL] Read/write dataframes with ANSI intervals from/to parquet files

Posted by GitBox <gi...@apache.org>.
MaxGekk closed pull request #34057:
URL: https://github.com/apache/spark/pull/34057


   


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


[GitHub] [spark] SparkQA removed a comment on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924475340


   **[Test build #143491 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143491/testReport)** for PR 34057 at commit [`abf79a2`](https://github.com/apache/spark/commit/abf79a2f728e636d73e7ca4d9a32e5b51f8541eb).


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


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

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-926163616


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48073/
   


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


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

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #34057:
URL: https://github.com/apache/spark/pull/34057#discussion_r715051701



##########
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:
       These are temporary changes. Eventually, we should support ANSI intervals in all built-in datasources.




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


[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

Posted by GitBox <gi...@apache.org>.
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


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

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-926117134


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48073/
   


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


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

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-925075722


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143507/
   


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


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

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-925006066


   @sarutak @beliefer @AngersZhuuuu @Peng-Lei @cloud-fan Could you review this PR, please.


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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924727983


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48012/
   


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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34057: [SPARK-36825][SQL] Read/write dataframes with ANSI intervals from/to parquet files

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-926163698


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48073/
   


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


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

Posted by GitBox <gi...@apache.org>.
sarutak commented on a change in pull request #34057:
URL: https://github.com/apache/spark/pull/34057#discussion_r715085936



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/CommonFileDataSourceSuite.scala
##########
@@ -36,22 +36,25 @@ trait CommonFileDataSourceSuite extends SQLHelper { self: AnyFunSuite =>
   protected def inputDataset: Dataset[_] = spark.createDataset(Seq("abc"))(Encoders.STRING)
 
   test(s"SPARK-36349: disallow saving of ANSI intervals to $dataSourceFormat") {
-    Seq("INTERVAL '1' DAY", "INTERVAL '1' YEAR").foreach { i =>
-      withTempPath { dir =>
-        val errMsg = intercept[AnalysisException] {
-          spark.sql(s"SELECT $i").write.format(dataSourceFormat).save(dir.getAbsolutePath)
-        }.getMessage
-        assert(errMsg.contains("Cannot save interval data type into external storage"))
+    if (!Set("parquet").contains(dataSourceFormat.toLowerCase(Locale.ROOT))) {
+      Seq("INTERVAL '1' DAY", "INTERVAL '1' YEAR").foreach { i =>
+        withTempPath { dir =>
+          val errMsg = intercept[AnalysisException] {
+            spark.sql(s"SELECT $i").write.format(dataSourceFormat).save(dir.getAbsolutePath)
+          }.getMessage
+          assert(errMsg.contains("Cannot save interval data type into external storage"))
+        }
       }
-    }
 
-    // Check all built-in file-based datasources except of libsvm which requires particular schema.
-    if (!Set("libsvm").contains(dataSourceFormat.toLowerCase(Locale.ROOT))) {
-      Seq("INTERVAL DAY TO SECOND", "INTERVAL YEAR TO MONTH").foreach { it =>
-        val errMsg = intercept[AnalysisException] {
-          spark.sql(s"CREATE TABLE t (i $it) USING $dataSourceFormat")
-        }.getMessage
-        assert(errMsg.contains("data source does not support"))
+      // Check all built-in file-based datasources except of libsvm which
+      // requires particular schema.
+      if (!Set("libsvm").contains(dataSourceFormat.toLowerCase(Locale.ROOT))) {
+        Seq("INTERVAL DAY TO SECOND", "INTERVAL YEAR TO MONTH").foreach { it =>
+          val errMsg = intercept[AnalysisException] {
+            spark.sql(s"CREATE TABLE t (i $it) USING $dataSourceFormat")

Review comment:
       I see. Let's do it as a followup work.




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


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

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-926247021


   **[Test build #143566 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143566/testReport)** for PR 34057 at commit [`32f4eb9`](https://github.com/apache/spark/commit/32f4eb968cac317f8c33b4467b11c9fbd4636c68).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924345624


   **[Test build #143483 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143483/testReport)** for PR 34057 at commit [`d3b5714`](https://github.com/apache/spark/commit/d3b5714b2ccb4213b4b15b2542f6126d6420a828).


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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924520259


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48002/
   


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924723504


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48012/
   


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924371411


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47994/
   


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


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

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-925073916


   **[Test build #143507 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143507/testReport)** for PR 34057 at commit [`62f26d9`](https://github.com/apache/spark/commit/62f26d9a06a49a05fdc1583522ce49a660d23cc3).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924372996


   **[Test build #143483 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143483/testReport)** for PR 34057 at commit [`d3b5714`](https://github.com/apache/spark/commit/d3b5714b2ccb4213b4b15b2542f6126d6420a828).
    * This patch **fails Spark unit tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924429361


   **[Test build #143485 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143485/testReport)** for PR 34057 at commit [`c0f45d0`](https://github.com/apache/spark/commit/c0f45d0c3f3f0d0e81a8221248853d172f416aef).
    * This patch **fails Spark unit tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.


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


[GitHub] [spark] AmplabJenkins commented on pull request #34057: [WIP][SPARK-36825][SQL] Read/write dataframes with ANSI intervals from/to parquet files

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924907660


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48017/
   


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


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

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #34057:
URL: https://github.com/apache/spark/pull/34057#discussion_r715060791



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/CommonFileDataSourceSuite.scala
##########
@@ -36,22 +36,25 @@ trait CommonFileDataSourceSuite extends SQLHelper { self: AnyFunSuite =>
   protected def inputDataset: Dataset[_] = spark.createDataset(Seq("abc"))(Encoders.STRING)
 
   test(s"SPARK-36349: disallow saving of ANSI intervals to $dataSourceFormat") {
-    Seq("INTERVAL '1' DAY", "INTERVAL '1' YEAR").foreach { i =>
-      withTempPath { dir =>
-        val errMsg = intercept[AnalysisException] {
-          spark.sql(s"SELECT $i").write.format(dataSourceFormat).save(dir.getAbsolutePath)
-        }.getMessage
-        assert(errMsg.contains("Cannot save interval data type into external storage"))
+    if (!Set("parquet").contains(dataSourceFormat.toLowerCase(Locale.ROOT))) {
+      Seq("INTERVAL '1' DAY", "INTERVAL '1' YEAR").foreach { i =>
+        withTempPath { dir =>
+          val errMsg = intercept[AnalysisException] {
+            spark.sql(s"SELECT $i").write.format(dataSourceFormat).save(dir.getAbsolutePath)
+          }.getMessage
+          assert(errMsg.contains("Cannot save interval data type into external storage"))
+        }
       }
-    }
 
-    // Check all built-in file-based datasources except of libsvm which requires particular schema.
-    if (!Set("libsvm").contains(dataSourceFormat.toLowerCase(Locale.ROOT))) {
-      Seq("INTERVAL DAY TO SECOND", "INTERVAL YEAR TO MONTH").foreach { it =>
-        val errMsg = intercept[AnalysisException] {
-          spark.sql(s"CREATE TABLE t (i $it) USING $dataSourceFormat")
-        }.getMessage
-        assert(errMsg.contains("data source does not support"))
+      // Check all built-in file-based datasources except of libsvm which
+      // requires particular schema.
+      if (!Set("libsvm").contains(dataSourceFormat.toLowerCase(Locale.ROOT))) {
+        Seq("INTERVAL DAY TO SECOND", "INTERVAL YEAR TO MONTH").foreach { it =>
+          val errMsg = intercept[AnalysisException] {
+            spark.sql(s"CREATE TABLE t (i $it) USING $dataSourceFormat")

Review comment:
       > should we add tests for `CREATE TABLE ...`
   
   Yes, we should but in this PR I focused on low-level support ANSI intervals in parquet. We should ensure that ANSI interval types are stored properly to catalogs, for instance. I especially highlighted that in the PR's description:
   
   _The given PR focus on support of ANSI intervals in the Parquet datasource via write or read as a column in `Dataset`_
   
   After the PR be merged, I plan to open sub-tasks for follow-up work, so, folks who are interested in this could do that in parallel. 




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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924389862


   **[Test build #143485 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143485/testReport)** for PR 34057 at commit [`c0f45d0`](https://github.com/apache/spark/commit/c0f45d0c3f3f0d0e81a8221248853d172f416aef).


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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924128530


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47985/
   


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


[GitHub] [spark] SparkQA removed a comment on pull request #34057: [SPARK-36825][SQL] Read/write dataframes with ANSI intervals from/to parquet files

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-926084671


   **[Test build #143566 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143566/testReport)** for PR 34057 at commit [`32f4eb9`](https://github.com/apache/spark/commit/32f4eb968cac317f8c33b4467b11c9fbd4636c68).


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


[GitHub] [spark] SparkQA removed a comment on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924389862


   **[Test build #143485 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143485/testReport)** for PR 34057 at commit [`c0f45d0`](https://github.com/apache/spark/commit/c0f45d0c3f3f0d0e81a8221248853d172f416aef).


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


[GitHub] [spark] AmplabJenkins commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924379876


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143483/
   


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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924429626


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143485/
   


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924492353


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48002/
   


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


[GitHub] [spark] AmplabJenkins commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924083898


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143474/
   


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SPARK-36825][SQL] Read/write dataframes with ANSI intervals from/to parquet files

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924869271


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48017/
   


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


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

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-926084671


   **[Test build #143566 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143566/testReport)** for PR 34057 at commit [`32f4eb9`](https://github.com/apache/spark/commit/32f4eb968cac317f8c33b4467b11c9fbd4636c68).


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


[GitHub] [spark] AmplabJenkins commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924541647


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143491/
   


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924537713


   **[Test build #143491 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143491/testReport)** for PR 34057 at commit [`abf79a2`](https://github.com/apache/spark/commit/abf79a2f728e636d73e7ca4d9a32e5b51f8541eb).
    * This patch **fails Spark unit tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SPARK-36825][SQL] Read/write dataframes with ANSI intervals from/to parquet files

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924837238


   **[Test build #143501 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143501/testReport)** for PR 34057 at commit [`801d65c`](https://github.com/apache/spark/commit/801d65c1b4ffabe8e4da165f81227f3226c4ab1a).
    * This patch **fails Spark unit tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.


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


[GitHub] [spark] AmplabJenkins commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924429626


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143485/
   


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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924449370


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47996/
   


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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34057: [SPARK-36825][SQL] Read/write dataframes with ANSI intervals from/to parquet files

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-926249407


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143566/
   


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


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

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-926390400


   Merging to master. Thank you, @sarutak @sunchao and @cloud-fan for review.


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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924400576


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47994/
   


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924400558


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47994/
   


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


[GitHub] [spark] AmplabJenkins commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924400576


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47994/
   


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924475340


   **[Test build #143491 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143491/testReport)** for PR 34057 at commit [`abf79a2`](https://github.com/apache/spark/commit/abf79a2f728e636d73e7ca4d9a32e5b51f8541eb).


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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34057: [WIP][SPARK-36825][SQL] Read/write dataframes with ANSI intervals from/to parquet files

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924838460


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143501/
   


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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924379876


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143483/
   


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


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

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-926249407


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143566/
   


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


[GitHub] [spark] AmplabJenkins commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924727983


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48012/
   


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


[GitHub] [spark] SparkQA removed a comment on pull request #34057: [WIP][SPARK-36825][SQL] Read/write dataframes with ANSI intervals from/to parquet files

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924656130


   **[Test build #143501 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143501/testReport)** for PR 34057 at commit [`801d65c`](https://github.com/apache/spark/commit/801d65c1b4ffabe8e4da165f81227f3226c4ab1a).


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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34057: [WIP][SPARK-36825][SQL] Read/write dataframes with ANSI intervals from/to parquet files

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924907660


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48017/
   


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SPARK-36825][SQL] Read/write dataframes with ANSI intervals from/to parquet files

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924906020


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48017/
   


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924046644


   **[Test build #143474 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143474/testReport)** for PR 34057 at commit [`0f1a0fb`](https://github.com/apache/spark/commit/0f1a0fb6b3dafdf760e0ba40d072de2baa06400b).


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


[GitHub] [spark] AmplabJenkins commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924128530


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47985/
   


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924509450


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48002/
   


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924444670


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47996/
   


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924419759


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47996/
   


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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924541647


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143491/
   


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


[GitHub] [spark] SparkQA removed a comment on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924345624


   **[Test build #143483 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143483/testReport)** for PR 34057 at commit [`d3b5714`](https://github.com/apache/spark/commit/d3b5714b2ccb4213b4b15b2542f6126d6420a828).


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


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

Posted by GitBox <gi...@apache.org>.
sarutak commented on a change in pull request #34057:
URL: https://github.com/apache/spark/pull/34057#discussion_r714944703



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetIOSuite.scala
##########
@@ -1060,6 +1061,25 @@ class ParquetIOSuite extends QueryTest with ParquetTest with SharedSparkSession
       }
     }
   }
+
+  test("SPARK-36825: year-month/day-time intervals written and read as INT32/INT64") {

Review comment:
       Should we care both V1 and V2 Parquet sources?

##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/CommonFileDataSourceSuite.scala
##########
@@ -36,22 +36,25 @@ trait CommonFileDataSourceSuite extends SQLHelper { self: AnyFunSuite =>
   protected def inputDataset: Dataset[_] = spark.createDataset(Seq("abc"))(Encoders.STRING)
 
   test(s"SPARK-36349: disallow saving of ANSI intervals to $dataSourceFormat") {
-    Seq("INTERVAL '1' DAY", "INTERVAL '1' YEAR").foreach { i =>
-      withTempPath { dir =>
-        val errMsg = intercept[AnalysisException] {
-          spark.sql(s"SELECT $i").write.format(dataSourceFormat).save(dir.getAbsolutePath)
-        }.getMessage
-        assert(errMsg.contains("Cannot save interval data type into external storage"))
+    if (!Set("parquet").contains(dataSourceFormat.toLowerCase(Locale.ROOT))) {
+      Seq("INTERVAL '1' DAY", "INTERVAL '1' YEAR").foreach { i =>
+        withTempPath { dir =>
+          val errMsg = intercept[AnalysisException] {
+            spark.sql(s"SELECT $i").write.format(dataSourceFormat).save(dir.getAbsolutePath)
+          }.getMessage
+          assert(errMsg.contains("Cannot save interval data type into external storage"))
+        }
       }
-    }
 
-    // Check all built-in file-based datasources except of libsvm which requires particular schema.
-    if (!Set("libsvm").contains(dataSourceFormat.toLowerCase(Locale.ROOT))) {
-      Seq("INTERVAL DAY TO SECOND", "INTERVAL YEAR TO MONTH").foreach { it =>
-        val errMsg = intercept[AnalysisException] {
-          spark.sql(s"CREATE TABLE t (i $it) USING $dataSourceFormat")
-        }.getMessage
-        assert(errMsg.contains("data source does not support"))
+      // Check all built-in file-based datasources except of libsvm which
+      // requires particular schema.
+      if (!Set("libsvm").contains(dataSourceFormat.toLowerCase(Locale.ROOT))) {
+        Seq("INTERVAL DAY TO SECOND", "INTERVAL YEAR TO MONTH").foreach { it =>
+          val errMsg = intercept[AnalysisException] {
+            spark.sql(s"CREATE TABLE t (i $it) USING $dataSourceFormat")

Review comment:
       Now that reading/writing ANSI interval types from/to Parquet no longer throws `AnalysysException`, should we add tests for `CREATE TABLE USING PARQUET` to ensure it's supported with Parquet?




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


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

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-925537908


   @mswit-databricks @ala @sadikovi Could you look at this PR, please.


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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34057: [SPARK-36825][SQL] Read/write dataframes with ANSI intervals from/to parquet files

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-925075722


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143507/
   


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SPARK-36825][SQL] Read/write dataframes with ANSI intervals from/to parquet files

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924834752


   **[Test build #143507 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143507/testReport)** for PR 34057 at commit [`62f26d9`](https://github.com/apache/spark/commit/62f26d9a06a49a05fdc1583522ce49a660d23cc3).


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


[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

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #34057:
URL: https://github.com/apache/spark/pull/34057#discussion_r714958461



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetIOSuite.scala
##########
@@ -1060,6 +1061,25 @@ class ParquetIOSuite extends QueryTest with ParquetTest with SharedSparkSession
       }
     }
   }
+
+  test("SPARK-36825: year-month/day-time intervals written and read as INT32/INT64") {
+    Seq(
+      YearMonthIntervalType() -> ((i: Int) => Period.of(i, i, 0)),
+      DayTimeIntervalType() -> ((i: Int) => Duration.ofDays(i).plusSeconds(i))
+    ).foreach { case (it, f) =>
+      val data = (1 to 10).map(i => Row(i, f(i)))
+      val schema = StructType(List(StructField("d", IntegerType, false),
+        StructField("i", it, false)).toArray)

Review comment:
       ```suggestion
         val schema = StructType(Array(StructField("d", IntegerType, false),
           StructField("i", it, false)))
   ```




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


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

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #34057:
URL: https://github.com/apache/spark/pull/34057#discussion_r715066479



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetIOSuite.scala
##########
@@ -1060,6 +1061,25 @@ class ParquetIOSuite extends QueryTest with ParquetTest with SharedSparkSession
       }
     }
   }
+
+  test("SPARK-36825: year-month/day-time intervals written and read as INT32/INT64") {

Review comment:
       I care of the default case in this PR when users save/load dataframes with ANSI intervals. Let's check/test V2 separately since it might require additional work (this PR cares mostly about low level stuff).




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


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

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #34057:
URL: https://github.com/apache/spark/pull/34057#discussion_r715049977



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetIOSuite.scala
##########
@@ -1060,6 +1061,25 @@ class ParquetIOSuite extends QueryTest with ParquetTest with SharedSparkSession
       }
     }
   }
+
+  test("SPARK-36825: year-month/day-time intervals written and read as INT32/INT64") {
+    Seq(
+      YearMonthIntervalType() -> ((i: Int) => Period.of(i, i, 0)),
+      DayTimeIntervalType() -> ((i: Int) => Duration.ofDays(i).plusSeconds(i))
+    ).foreach { case (it, f) =>
+      val data = (1 to 10).map(i => Row(i, f(i)))
+      val schema = StructType(List(StructField("d", IntegerType, false),
+        StructField("i", it, false)).toArray)

Review comment:
       haha, I actually borrowed the code from your test https://github.com/apache/spark/pull/19702/files#diff-07f918aa5538eb47de4ef8065cf016e773bb472466dbef73898c1517272db191R244-R245 :-)




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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924656130


   **[Test build #143501 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143501/testReport)** for PR 34057 at commit [`801d65c`](https://github.com/apache/spark/commit/801d65c1b4ffabe8e4da165f81227f3226c4ab1a).


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924082392


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47985/
   


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


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

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-926163698


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48073/
   


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


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

Posted by GitBox <gi...@apache.org>.
MaxGekk commented on a change in pull request #34057:
URL: https://github.com/apache/spark/pull/34057#discussion_r715051701



##########
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:
       These are a temporary changes. Eventually, we should support ANSI intervals in all built-in datasources.




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


[GitHub] [spark] SparkQA removed a comment on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924046644


   **[Test build #143474 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143474/testReport)** for PR 34057 at commit [`0f1a0fb`](https://github.com/apache/spark/commit/0f1a0fb6b3dafdf760e0ba40d072de2baa06400b).


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


[GitHub] [spark] AmplabJenkins commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924520259


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48002/
   


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924083622


   **[Test build #143474 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143474/testReport)** for PR 34057 at commit [`0f1a0fb`](https://github.com/apache/spark/commit/0f1a0fb6b3dafdf760e0ba40d072de2baa06400b).
    * This patch **fails Spark unit tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.


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


[GitHub] [spark] AmplabJenkins commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924449370


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/47996/
   


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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924083898


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143474/
   


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


[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

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #34057:
URL: https://github.com/apache/spark/pull/34057#discussion_r714955008



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala
##########
@@ -384,7 +384,7 @@ class FileBasedDataSourceSuite extends QueryTest
 
         withSQLConf(SQLConf.USE_V1_SOURCE_LIST.key -> useV1List) {
           // write path
-          Seq("csv", "json", "parquet", "orc").foreach { format =>
+          Seq("csv", "json", "orc").foreach { format =>
             val msg = intercept[AnalysisException] {
               sql("select interval 1 days").write.format(format).mode("overwrite").save(tempDir)

Review comment:
       shall we update the test to create legacy interval types? I think this test is useful to make sure we can't write the legacy interval types to all the 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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924688951


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48012/
   


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


[GitHub] [spark] SparkQA removed a comment on pull request #34057: [SPARK-36825][SQL] Read/write dataframes with ANSI intervals from/to parquet files

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924834752


   **[Test build #143507 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143507/testReport)** for PR 34057 at commit [`62f26d9`](https://github.com/apache/spark/commit/62f26d9a06a49a05fdc1583522ce49a660d23cc3).


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


[GitHub] [spark] SparkQA commented on pull request #34057: [WIP][SQL] Read/write ANSI intervals from/to the parquet datasource

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34057:
URL: https://github.com/apache/spark/pull/34057#issuecomment-924122655


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/47985/
   


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