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/02/02 06:27:11 UTC

[GitHub] [spark] turboFei opened a new pull request #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

turboFei opened a new pull request #31431:
URL: https://github.com/apache/spark/pull/31431


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

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 #31431: [SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] turboFei removed a comment on pull request #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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


   For temporary view, its logical plan has been stored in catalog and the logical plan has been analyzed.
   
   So, even we refresh its underlying table, it logical plan would not been changed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [WIP][SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [WIP][SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] turboFei commented on a change in pull request #31431: [SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala
##########
@@ -1374,7 +1375,55 @@ case class RefreshTableCommand(tableIdent: TableIdentifier)
   override def run(sparkSession: SparkSession): Seq[Row] = {
     // Refresh the given table's metadata. If this table is cached as an InMemoryRelation,
     // drop the original cached version and make the new version cached lazily.
-    sparkSession.catalog.refreshTable(tableIdent.quotedString)
+    // If this table is a view, also refresh its underlying tables.
+    refreshAllUnderlyingTables(tableIdent, sparkSession)
     Seq.empty[Row]
   }
+
+  private def refreshAllUnderlyingTables(
+      tableIdent: TableIdentifier, sparkSession: SparkSession): Unit = {
+    val tableName = tableIdent.unquotedString
+    val catalog = sparkSession.sessionState.catalog
+    val table = catalog.getTempViewOrPermanentTableMetadata(tableIdent)
+    sparkSession.catalog.refreshTable(tableName)
+
+    if (table.tableType == CatalogTableType.VIEW) {
+      if (table.viewText.isDefined) {
+        val parser = sparkSession.sessionState.sqlParser
+        val unresolvedPlan = parser.parsePlan(table.viewText.get)
+        findOutUnderlyingTables(unresolvedPlan).foreach { t =>
+          refreshAllUnderlyingTables(t, sparkSession)
+        }
+      } else {
+        catalog.getTempView(tableName)
+          .orElse(catalog.getGlobalTempView(tableName))
+          .map(findOutUnderlyingTables).foreach { tables =>

Review comment:
       In branch-2.3, the logical plan for temporary view is analyzed logical plan.
   
   In master  branch, it is unresolved logical plan.
   
   So I also enable refresh underlying tables for temporary view.

##########
File path: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala
##########
@@ -2581,6 +2581,48 @@ abstract class SQLQuerySuiteBase extends QueryTest with SQLTestUtils with TestHi
       }
     }
   }
+
+  test("SPARK-34322: When refreshing a view, also refresh its underlying tables") {
+    withTempDir { dir1 =>
+      withTempDir { dir2 =>
+        withTable("ta", "tb") {
+          withView("v") {
+            withTempView("tv1", "tv2") {
+              sql(s"create table ta(id int) using parquet")
+              sql(s"create table tb(id int) using parquet")
+              sql("create view v as select * from ta")
+              sql("create temporary view tv1 as select * from tb")
+              sql("create temporary view tv2 as select * from tv1")
+              sql("insert into table ta values(1)")
+              sql("cache table ta")
+              sql("insert into table tb values(1)")
+              sql("cache table tb")
+
+              val qualifiedTaName = QualifiedTableName("default", "ta")
+              val cachedTa = spark.sessionState.catalog.getCachedTable(qualifiedTaName)
+
+              val qualifiedTbName = QualifiedTableName("default", "tb")
+              val cachedTb = spark.sessionState.catalog.getCachedTable(qualifiedTaName)
+
+              val newSession = spark.newSession()
+              newSession.sql(s"alter table ta set location '${dir1.getAbsolutePath}'")
+              newSession.sql("insert into table ta values(2)")
+              newSession.sql(s"alter table tb set location '${dir2.getAbsolutePath}'")
+              newSession.sql("insert into table tb values(2)")
+              newSession.sessionState.catalog.cacheTable(qualifiedTaName, cachedTa)

Review comment:
       because the new session shared the catalog with original spark session.
   And alter table set location command will invalid cached table, so I have to cache old cache info manually.

##########
File path: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala
##########
@@ -2581,6 +2581,48 @@ abstract class SQLQuerySuiteBase extends QueryTest with SQLTestUtils with TestHi
       }
     }
   }
+
+  test("SPARK-34322: When refreshing a view, also refresh its underlying tables") {
+    withTempDir { dir1 =>
+      withTempDir { dir2 =>
+        withTable("ta", "tb") {
+          withView("v") {
+            withTempView("tv1", "tv2") {
+              sql(s"create table ta(id int) using parquet")
+              sql(s"create table tb(id int) using parquet")
+              sql("create view v as select * from ta")
+              sql("create temporary view tv1 as select * from tb")
+              sql("create temporary view tv2 as select * from tv1")
+              sql("insert into table ta values(1)")
+              sql("cache table ta")
+              sql("insert into table tb values(1)")
+              sql("cache table tb")
+
+              val qualifiedTaName = QualifiedTableName("default", "ta")
+              val cachedTa = spark.sessionState.catalog.getCachedTable(qualifiedTaName)
+
+              val qualifiedTbName = QualifiedTableName("default", "tb")
+              val cachedTb = spark.sessionState.catalog.getCachedTable(qualifiedTaName)
+
+              val newSession = spark.newSession()
+              newSession.sql(s"alter table ta set location '${dir1.getAbsolutePath}'")
+              newSession.sql("insert into table ta values(2)")
+              newSession.sql(s"alter table tb set location '${dir2.getAbsolutePath}'")
+              newSession.sql("insert into table tb values(2)")
+              newSession.sessionState.catalog.cacheTable(qualifiedTaName, cachedTa)

Review comment:
       because the new session share the catalog with original spark session.
   And alter table set location command will invalid cached table, so I have to cache old cache info manually.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] turboFei commented on pull request #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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


   The UT passed in our spark-2.3 branch, will try to find out why it failed in community master branch.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] turboFei commented on pull request #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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


   For temporary view, its logical plan has been stored in catalog and the logical plan has been analyzed.
   
   So, even we refresh its underlying table, it logical plan would not been changed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


   **[Test build #134776 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134776/testReport)** for PR 31431 at commit [`6c03dc2`](https://github.com/apache/spark/commit/6c03dc261fae819d260c2df66757616afb7035d4).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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


   Can one of the admins verify this patch?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] turboFei commented on pull request #31431: [WIP][SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


   > I don't quite understand the motivation, shouldn't a cached view be automatically refreshed whenever any of its underlying table is updated?
   
   If the underlying table is updated outside of current spark context, the cached view won't be refreshed automated.
   
   It seems that `clear cache` can help for this case.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] github-actions[bot] commented on pull request #31431: [WIP][SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #31431:
URL: https://github.com/apache/spark/pull/31431#issuecomment-841742970


   We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
   If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [WIP][SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


   **[Test build #134843 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134843/testReport)** for PR 31431 at commit [`84bf228`](https://github.com/apache/spark/commit/84bf2284dfe8dfa19493f2b03a1e953b615a8ff0).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] turboFei commented on a change in pull request #31431: [SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/tables.scala
##########
@@ -1374,7 +1375,55 @@ case class RefreshTableCommand(tableIdent: TableIdentifier)
   override def run(sparkSession: SparkSession): Seq[Row] = {
     // Refresh the given table's metadata. If this table is cached as an InMemoryRelation,
     // drop the original cached version and make the new version cached lazily.
-    sparkSession.catalog.refreshTable(tableIdent.quotedString)
+    // If this table is a view, also refresh its underlying tables.
+    refreshAllUnderlyingTables(tableIdent, sparkSession)
     Seq.empty[Row]
   }
+
+  private def refreshAllUnderlyingTables(
+      tableIdent: TableIdentifier, sparkSession: SparkSession): Unit = {
+    val tableName = tableIdent.unquotedString
+    val catalog = sparkSession.sessionState.catalog
+    val table = catalog.getTempViewOrPermanentTableMetadata(tableIdent)
+    sparkSession.catalog.refreshTable(tableName)
+
+    if (table.tableType == CatalogTableType.VIEW) {
+      if (table.viewText.isDefined) {
+        val parser = sparkSession.sessionState.sqlParser
+        val unresolvedPlan = parser.parsePlan(table.viewText.get)
+        findOutUnderlyingTables(unresolvedPlan).foreach { t =>
+          refreshAllUnderlyingTables(t, sparkSession)
+        }
+      } else {
+        catalog.getTempView(tableName)
+          .orElse(catalog.getGlobalTempView(tableName))
+          .map(findOutUnderlyingTables).foreach { tables =>

Review comment:
       In branch-2.3, the logical plan for temporary view is analyzed logical plan.
   
   In master  branch, it is unresolved logical plan.
   
   So I also enable refresh underlying tables for temporary view.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] sunchao commented on pull request #31431: [SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


   I don't quite understand the motivation, shouldn't a cached view be automatically refreshed whenever any of its underlying table is updated? 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [WIP][SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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


   Can one of the admins verify this patch?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] turboFei commented on a change in pull request #31431: [SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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



##########
File path: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala
##########
@@ -2581,6 +2581,48 @@ abstract class SQLQuerySuiteBase extends QueryTest with SQLTestUtils with TestHi
       }
     }
   }
+
+  test("SPARK-34322: When refreshing a view, also refresh its underlying tables") {
+    withTempDir { dir1 =>
+      withTempDir { dir2 =>
+        withTable("ta", "tb") {
+          withView("v") {
+            withTempView("tv1", "tv2") {
+              sql(s"create table ta(id int) using parquet")
+              sql(s"create table tb(id int) using parquet")
+              sql("create view v as select * from ta")
+              sql("create temporary view tv1 as select * from tb")
+              sql("create temporary view tv2 as select * from tv1")
+              sql("insert into table ta values(1)")
+              sql("cache table ta")
+              sql("insert into table tb values(1)")
+              sql("cache table tb")
+
+              val qualifiedTaName = QualifiedTableName("default", "ta")
+              val cachedTa = spark.sessionState.catalog.getCachedTable(qualifiedTaName)
+
+              val qualifiedTbName = QualifiedTableName("default", "tb")
+              val cachedTb = spark.sessionState.catalog.getCachedTable(qualifiedTaName)
+
+              val newSession = spark.newSession()
+              newSession.sql(s"alter table ta set location '${dir1.getAbsolutePath}'")
+              newSession.sql("insert into table ta values(2)")
+              newSession.sql(s"alter table tb set location '${dir2.getAbsolutePath}'")
+              newSession.sql("insert into table tb values(2)")
+              newSession.sessionState.catalog.cacheTable(qualifiedTaName, cachedTa)

Review comment:
       because the new session shared the catalog with original spark session.
   And alter table set location command will invalid cached table, so I have to cache old cache info manually.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [WIP][SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


   **[Test build #134843 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134843/testReport)** for PR 31431 at commit [`84bf228`](https://github.com/apache/spark/commit/84bf2284dfe8dfa19493f2b03a1e953b615a8ff0).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] github-actions[bot] closed pull request #31431: [WIP][SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #31431:
URL: https://github.com/apache/spark/pull/31431


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [WIP][SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] turboFei removed a comment on pull request #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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


   For temporary view, its logical plan has been stored in catalog and the logical plan has been analyzed.
   
   So, even we refresh its underlying table, it logical plan would not been changed.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] maropu commented on pull request #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] github-actions[bot] commented on pull request #31431: [WIP][SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #31431:
URL: https://github.com/apache/spark/pull/31431#issuecomment-841742970


   We're closing this PR because it hasn't been updated in a while. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable.
   If you'd like to revive this PR, please reopen it and ask a committer to remove the Stale tag!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] turboFei commented on pull request #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] github-actions[bot] closed pull request #31431: [WIP][SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed pull request #31431:
URL: https://github.com/apache/spark/pull/31431


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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


   Can one of the admins verify this patch?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] turboFei commented on a change in pull request #31431: [SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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



##########
File path: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala
##########
@@ -2581,6 +2581,48 @@ abstract class SQLQuerySuiteBase extends QueryTest with SQLTestUtils with TestHi
       }
     }
   }
+
+  test("SPARK-34322: When refreshing a view, also refresh its underlying tables") {
+    withTempDir { dir1 =>
+      withTempDir { dir2 =>
+        withTable("ta", "tb") {
+          withView("v") {
+            withTempView("tv1", "tv2") {
+              sql(s"create table ta(id int) using parquet")
+              sql(s"create table tb(id int) using parquet")
+              sql("create view v as select * from ta")
+              sql("create temporary view tv1 as select * from tb")
+              sql("create temporary view tv2 as select * from tv1")
+              sql("insert into table ta values(1)")
+              sql("cache table ta")
+              sql("insert into table tb values(1)")
+              sql("cache table tb")
+
+              val qualifiedTaName = QualifiedTableName("default", "ta")
+              val cachedTa = spark.sessionState.catalog.getCachedTable(qualifiedTaName)
+
+              val qualifiedTbName = QualifiedTableName("default", "tb")
+              val cachedTb = spark.sessionState.catalog.getCachedTable(qualifiedTaName)
+
+              val newSession = spark.newSession()
+              newSession.sql(s"alter table ta set location '${dir1.getAbsolutePath}'")
+              newSession.sql("insert into table ta values(2)")
+              newSession.sql(s"alter table tb set location '${dir2.getAbsolutePath}'")
+              newSession.sql("insert into table tb values(2)")
+              newSession.sessionState.catalog.cacheTable(qualifiedTaName, cachedTa)

Review comment:
       because the new session share the catalog with original spark session.
   And alter table set location command will invalid cached table, so I have to cache old cache info manually.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [WIP][SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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


   **[Test build #134763 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134763/testReport)** for PR 31431 at commit [`62e4027`](https://github.com/apache/spark/commit/62e40275f4ab616d3089ea18e1037b7ccb2c4e4d).
    * 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.

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 #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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


   Can one of the admins verify this patch?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [WIP][SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


   **[Test build #134843 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/134843/testReport)** for PR 31431 at commit [`84bf228`](https://github.com/apache/spark/commit/84bf2284dfe8dfa19493f2b03a1e953b615a8ff0).
    * 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.

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 #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] maropu commented on pull request #31431: [SPARK-34322][SQL] When refreshing a non-temporary view, also refresh its underlying tables

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






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [WIP][SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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 #31431: [SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
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] sunchao commented on pull request #31431: [SPARK-34322][SQL] When refreshing a view, also refresh its underlying tables

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


   I don't quite understand the motivation, shouldn't a cached view be automatically refreshed whenever any of its underlying table is updated? 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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