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 2020/12/02 09:53:02 UTC

[GitHub] [spark] linhongliu-db opened a new pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

linhongliu-db opened a new pull request #30567:
URL: https://github.com/apache/spark/pull/30567


   ### What changes were proposed in this pull request?
   Currently, in spark, the temp view is saved as its analyzed logical plan, while the permanent view
   is kept in HMS with its origin SQL text. As a result, permanent and temporary views have
   different behaviors in some cases. In this PR we store the SQL text for temporary view in order
   to unify the behavior between permanent and temporary views.
   
   
   ### Why are the changes needed?
   to unify the behavior between permanent and temporary views
   
   
   ### Does this PR introduce _any_ user-facing change?
   Yes
   
   
   ### How was this patch tested?
   new added test cases


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132148 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132148/testReport)** for PR 30567 at commit [`7a5cd03`](https://github.com/apache/spark/commit/7a5cd03e03976090628df982e4d852984bf7dda8).
    * 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] SparkQA commented on pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132168 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132168/testReport)** for PR 30567 at commit [`8c62b72`](https://github.com/apache/spark/commit/8c62b7215a64dd88c8ab02af06ccf3174d9b8f78).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132096 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132096/testReport)** for PR 30567 at commit [`979daa6`](https://github.com/apache/spark/commit/979daa654d10d9dd391cba67da05aa4b427021cf).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132122 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132122/testReport)** for PR 30567 at commit [`392b8e8`](https://github.com/apache/spark/commit/392b8e84e5a582489b3c6a9f8219b21990c8a99b).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SPARK-33647][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132086 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132086/testReport)** for PR 30567 at commit [`f049fa1`](https://github.com/apache/spark/commit/f049fa1c59d42641bb404081bd7e805efeb1089a).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132086 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132086/testReport)** for PR 30567 at commit [`f049fa1`](https://github.com/apache/spark/commit/f049fa1c59d42641bb404081bd7e805efeb1089a).
    * 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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #30567: [SPARK-33142][SPARK-33647][SQL] Store SQL text for SQL temp view

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala
##########
@@ -797,26 +802,24 @@ class SessionCatalog(
     val multiParts = Seq(CatalogManager.SESSION_CATALOG_NAME, db, table)
 
     if (metadata.tableType == CatalogTableType.VIEW) {
-      val viewText = metadata.viewText.getOrElse(sys.error("Invalid view without text."))
-      val viewConfigs = metadata.viewSQLConfigs
-      val viewPlan = SQLConf.withExistingConf(View.effectiveSQLConf(viewConfigs)) {
-        parser.parsePlan(viewText)
-      }
-
-      logDebug(s"'$viewText' will be used for the view($table) with configs: $viewConfigs.")
       // The relation is a view, so we wrap the relation by:
       // 1. Add a [[View]] operator over the relation to keep track of the view desc;
       // 2. Wrap the logical plan in a [[SubqueryAlias]] which tracks the name of the view.
-      val child = View(
-        desc = metadata,
-        output = metadata.schema.toAttributes,
-        child = viewPlan)
+      val child = View.fromCatalogTable(metadata, isTempView = false, parser)
       SubqueryAlias(multiParts, child)
     } else {
       SubqueryAlias(multiParts, UnresolvedCatalogRelation(metadata, options))
     }
   }
 
+  def getTempViewPlan(plan: LogicalPlan): LogicalPlan = {

Review comment:
       this can be private.




----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132055 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132055/testReport)** for PR 30567 at commit [`a0ab11d`](https://github.com/apache/spark/commit/a0ab11d260dbe539f7fc62b71dde6d27ced8ce5f).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132148 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132148/testReport)** for PR 30567 at commit [`7a5cd03`](https://github.com/apache/spark/commit/7a5cd03e03976090628df982e4d852984bf7dda8).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132173 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132173/testReport)** for PR 30567 at commit [`bc038c5`](https://github.com/apache/spark/commit/bc038c503adb06e23f01f5f56e73cf6cfdf63379).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132168 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132168/testReport)** for PR 30567 at commit [`8c62b72`](https://github.com/apache/spark/commit/8c62b7215a64dd88c8ab02af06ccf3174d9b8f78).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132055 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132055/testReport)** for PR 30567 at commit [`a0ab11d`](https://github.com/apache/spark/commit/a0ab11d260dbe539f7fc62b71dde6d27ced8ce5f).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132122 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132122/testReport)** for PR 30567 at commit [`392b8e8`](https://github.com/apache/spark/commit/392b8e84e5a582489b3c6a9f8219b21990c8a99b).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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] linhongliu-db commented on a change in pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

Posted by GitBox <gi...@apache.org>.
linhongliu-db commented on a change in pull request #30567:
URL: https://github.com/apache/spark/pull/30567#discussion_r534217969



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala
##########
@@ -266,15 +305,32 @@ case class AlterViewAsCommand(
     qe.assertAnalyzed()
     val analyzedPlan = qe.analyzed
 
-    if (session.sessionState.catalog.alterTempViewDefinition(name, analyzedPlan)) {
-      // a local/global temp view has been altered, we are done.
+    if (session.sessionState.catalog.isTemporaryTable(name)) {
+      alterTemporaryView(session, analyzedPlan)
     } else {
       alterPermanentView(session, analyzedPlan)
     }
-
     Seq.empty[Row]
   }
 
+  private def alterTemporaryView(session: SparkSession, analyzedPlan: LogicalPlan): Unit = {
+    val tableDefinition = if (conf.storeAnalyzedPlanForView) {
+      analyzedPlan
+    } else {
+      val properties = generateViewProperties(
+        Map.empty, session, analyzedPlan, analyzedPlan.schema.fieldNames)
+
+      TemporaryViewRelation(CatalogTable(

Review comment:
       we can if we move `prepareTemporaryView` to `ViewHelper`, but it's a little bit weird to keep `prepareTemporaryView` and `prepareTable` in 2 different class/object




----------------------------------------------------------------
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] linhongliu-db commented on pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

Posted by GitBox <gi...@apache.org>.
linhongliu-db commented on pull request #30567:
URL: https://github.com/apache/spark/pull/30567#issuecomment-737250554


   cc @cloud-fan @leanken 


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala
##########
@@ -817,6 +823,25 @@ class SessionCatalog(
     }
   }
 
+  def parseTempViewPlan(plan: LogicalPlan): LogicalPlan = {
+    plan match {
+      case viewInfo: TemporaryViewRelation =>
+        val metadata = viewInfo.tableMeta

Review comment:
       to remove duplicated code, we can have a function that turns `CatalogTable` to `View`, and takes a `isTemp` flag.




----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala
##########
@@ -266,15 +305,32 @@ case class AlterViewAsCommand(
     qe.assertAnalyzed()
     val analyzedPlan = qe.analyzed
 
-    if (session.sessionState.catalog.alterTempViewDefinition(name, analyzedPlan)) {
-      // a local/global temp view has been altered, we are done.
+    if (session.sessionState.catalog.isTemporaryTable(name)) {
+      alterTemporaryView(session, analyzedPlan)
     } else {
       alterPermanentView(session, analyzedPlan)
     }
-
     Seq.empty[Row]
   }
 
+  private def alterTemporaryView(session: SparkSession, analyzedPlan: LogicalPlan): Unit = {
+    val tableDefinition = if (conf.storeAnalyzedPlanForView) {
+      analyzedPlan
+    } else {
+      val properties = generateViewProperties(
+        Map.empty, session, analyzedPlan, analyzedPlan.schema.fieldNames)
+
+      TemporaryViewRelation(CatalogTable(

Review comment:
       I think it's OK, `ViewHelper` should contain view related utils.




----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132052 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132052/testReport)** for PR 30567 at commit [`ba54f31`](https://github.com/apache/spark/commit/ba54f31f81b6d832e69fe86da4313c2688fb141c).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132122 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132122/testReport)** for PR 30567 at commit [`392b8e8`](https://github.com/apache/spark/commit/392b8e84e5a582489b3c6a9f8219b21990c8a99b).
    * 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] cloud-fan commented on a change in pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/SQLViewTestSuite.scala
##########
@@ -0,0 +1,192 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.spark.sql.execution
+
+import org.apache.spark.sql.{QueryTest, Row}
+import org.apache.spark.sql.internal.SQLConf._
+import org.apache.spark.sql.test.{SharedSparkSession, SQLTestUtils}
+
+/**
+ * A base suite contains a set of view related test cases for different kind of views
+ * Currently, the test cases in this suite should have same behavior across all kind of views
+ * TODO: Combine this with [[SQLViewSuite]]
+ */
+abstract class SQLViewTestSuite extends QueryTest with SQLTestUtils {
+  import testImplicits._
+
+  def testView(viewName: String, columnNames: Seq[String], sqlText: String)(f: => Unit): Unit
+
+  def formatViewName(viewName: String): String
+
+  test("change SQLConf should not change view behavior - caseSensitiveAnalysis") {
+    withTable("t") {
+      Seq(2, 3, 1).toDF("c1").write.format("parquet").saveAsTable("t")
+      testView("v1", Seq("c1"), "SELECT C1 FROM t") {

Review comment:
       This test is a bit hard to read. How about
   ```
   def createView(viewName: String, columnNames: Seq[String], sqlText: String): String
   ...
   var viewName = ""
   def check(...) = { checkAnswer(sql(s"SELECT * FROM viewName"), ...) }
   withSQLConf(conf) {
     viewName =  createView(...)
     check()
   }
   withSQLConf(flippedConf) {
      check()
   }
   ```




----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132173 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132173/testReport)** for PR 30567 at commit [`bc038c5`](https://github.com/apache/spark/commit/bc038c503adb06e23f01f5f56e73cf6cfdf63379).
    * 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] AmplabJenkins removed a comment on pull request #30567: [SPARK-33142][SPARK-33647][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SPARK-33647][SQL] Store SQL text for SQL temp view

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


   **[Test build #132178 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132178/testReport)** for PR 30567 at commit [`db9f0ba`](https://github.com/apache/spark/commit/db9f0baffd424beba5f9efd19620d781cfb2b22b).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132148 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132148/testReport)** for PR 30567 at commit [`7a5cd03`](https://github.com/apache/spark/commit/7a5cd03e03976090628df982e4d852984bf7dda8).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala
##########
@@ -266,15 +305,32 @@ case class AlterViewAsCommand(
     qe.assertAnalyzed()
     val analyzedPlan = qe.analyzed
 
-    if (session.sessionState.catalog.alterTempViewDefinition(name, analyzedPlan)) {
-      // a local/global temp view has been altered, we are done.
+    if (session.sessionState.catalog.isTemporaryTable(name)) {
+      alterTemporaryView(session, analyzedPlan)
     } else {
       alterPermanentView(session, analyzedPlan)
     }
-
     Seq.empty[Row]
   }
 
+  private def alterTemporaryView(session: SparkSession, analyzedPlan: LogicalPlan): Unit = {
+    val tableDefinition = if (conf.storeAnalyzedPlanForView) {
+      analyzedPlan
+    } else {
+      val properties = generateViewProperties(
+        Map.empty, session, analyzedPlan, analyzedPlan.schema.fieldNames)
+
+      TemporaryViewRelation(CatalogTable(

Review comment:
       can we call `prepareTemporaryView`?




----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132096 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132096/testReport)** for PR 30567 at commit [`979daa6`](https://github.com/apache/spark/commit/979daa654d10d9dd391cba67da05aa4b427021cf).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132038 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132038/testReport)** for PR 30567 at commit [`09419a6`](https://github.com/apache/spark/commit/09419a6fa82d957d10a65ca9a5fd144db603a206).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132106 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132106/testReport)** for PR 30567 at commit [`e19e7e3`](https://github.com/apache/spark/commit/e19e7e34e0336ae1412def733a7db86d20c86be9).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SPARK-33647][SQL] Store SQL text for SQL temp view

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


   **[Test build #132178 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132178/testReport)** for PR 30567 at commit [`db9f0ba`](https://github.com/apache/spark/commit/db9f0baffd424beba5f9efd19620d781cfb2b22b).
    * 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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132178 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132178/testReport)** for PR 30567 at commit [`db9f0ba`](https://github.com/apache/spark/commit/db9f0baffd424beba5f9efd19620d781cfb2b22b).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala
##########
@@ -817,6 +823,25 @@ class SessionCatalog(
     }
   }
 
+  def parseTempViewPlan(plan: LogicalPlan): LogicalPlan = {

Review comment:
       nit: `getTempViewPlan`




----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132052 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132052/testReport)** for PR 30567 at commit [`ba54f31`](https://github.com/apache/spark/commit/ba54f31f81b6d832e69fe86da4313c2688fb141c).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132106 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132106/testReport)** for PR 30567 at commit [`e19e7e3`](https://github.com/apache/spark/commit/e19e7e34e0336ae1412def733a7db86d20c86be9).
    * 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] SparkQA commented on pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala
##########
@@ -846,9 +846,10 @@ class Analyzer(override val catalogManager: CatalogManager)
   object ResolveTempViews extends Rule[LogicalPlan] {
     def apply(plan: LogicalPlan): LogicalPlan = plan.resolveOperatorsUp {
       case u @ UnresolvedRelation(ident, _, isStreaming) =>
-        lookupTempView(ident, isStreaming).getOrElse(u)
+        lookupTempView(ident, isStreaming).map(ResolveRelations.resolveViews).getOrElse(u)
       case i @ InsertIntoStatement(UnresolvedRelation(ident, _, false), _, _, _, _, _) =>
         lookupTempView(ident)
+          .map(ResolveRelations.resolveViews)

Review comment:
       nit: do this in `lookupTempView`?




----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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] cloud-fan closed pull request #30567: [SPARK-33142][SPARK-33647][SQL] Store SQL text for SQL temp view

Posted by GitBox <gi...@apache.org>.
cloud-fan closed pull request #30567:
URL: https://github.com/apache/spark/pull/30567


   


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala
##########
@@ -116,17 +116,30 @@ case class CreateViewCommand(
         CommandUtils.uncacheTableOrView(sparkSession, name.quotedString)
       }
       val aliasedPlan = aliasPlan(sparkSession, analyzedPlan)

Review comment:
       we should call `checkCyclicViewReference` for temp view as well, and add test for it (or find the existing test for this and move it to the new suite).




----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132038 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132038/testReport)** for PR 30567 at commit [`09419a6`](https://github.com/apache/spark/commit/09419a6fa82d957d10a65ca9a5fd144db603a206).


----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/interface.scala
##########
@@ -667,6 +667,15 @@ case class UnresolvedCatalogRelation(
   override def output: Seq[Attribute] = Nil
 }
 
+/**
+ * A wrapper to store the temporary view info, will be kept in `SessionCatalog`
+ * and will be transformed to `View` in `getTempView`

Review comment:
       `in getTempView`, there are more places, maybe just say `will be transformed to View during analysis`




----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132173 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132173/testReport)** for PR 30567 at commit [`bc038c5`](https://github.com/apache/spark/commit/bc038c503adb06e23f01f5f56e73cf6cfdf63379).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132096 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132096/testReport)** for PR 30567 at commit [`979daa6`](https://github.com/apache/spark/commit/979daa654d10d9dd391cba67da05aa4b427021cf).
    * 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] cloud-fan commented on a change in pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/catalog/SessionCatalog.scala
##########
@@ -654,20 +654,25 @@ class SessionCatalog(
   def getTempViewOrPermanentTableMetadata(name: TableIdentifier): CatalogTable = synchronized {
     val table = formatTableName(name.table)
     if (name.database.isEmpty) {
-      getTempView(table).map { plan =>
-        CatalogTable(
-          identifier = TableIdentifier(table),
-          tableType = CatalogTableType.VIEW,
-          storage = CatalogStorageFormat.empty,
-          schema = plan.output.toStructType)
+      getTempView(table).map {
+        case TemporaryViewRelation(metadata) => metadata
+        case plan =>
+          CatalogTable(
+            identifier = TableIdentifier(table),
+            tableType = CatalogTableType.VIEW,
+            storage = CatalogStorageFormat.empty,
+            schema = plan.output.toStructType)
       }.getOrElse(getTableMetadata(name))
     } else if (formatDatabaseName(name.database.get) == globalTempViewManager.database) {
-      globalTempViewManager.get(table).map { plan =>
-        CatalogTable(
-          identifier = TableIdentifier(table, Some(globalTempViewManager.database)),
-          tableType = CatalogTableType.VIEW,
-          storage = CatalogStorageFormat.empty,
-          schema = plan.output.toStructType)
+      val a = globalTempViewManager.get(table)

Review comment:
       we can remove this line




----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132106 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132106/testReport)** for PR 30567 at commit [`e19e7e3`](https://github.com/apache/spark/commit/e19e7e34e0336ae1412def733a7db86d20c86be9).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/SQLViewSuite.scala
##########
@@ -763,6 +764,48 @@ abstract class SQLViewSuite extends QueryTest with SQLTestUtils {
     }
   }
 
+  test("temporary view should ignore useCurrentSQLConfigsForView config") {
+    withTable("t") {
+      Seq(2, 3, 1).toDF("c1").write.format("parquet").saveAsTable("t")
+      withTempView("v1") {
+        sql("CREATE TEMPORARY VIEW v1 AS SELECT 1/0")
+        withSQLConf(
+          USE_CURRENT_SQL_CONFIGS_FOR_VIEW.key -> "true",
+          ANSI_ENABLED.key -> "true") {
+          checkAnswer(sql("SELECT * FROM v1"), Seq(Row(null)))
+        }
+      }
+    }
+  }
+
+  test("alter temporary view should follow current storeAnalyzedPlanForView config") {
+    withTable("t") {
+      Seq(2, 3, 1).toDF("c1").write.format("parquet").saveAsTable("t")
+      withView("v1") {
+        withSQLConf(STORE_ANALYZED_PLAN_FOR_VIEW.key -> "true") {
+          sql("CREATE TEMPORARY VIEW v1 AS SELECT * FROM t")

Review comment:
       let's also test the first created view and make sure it respect `STORE_ANALYZED_PLAN_FOR_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] AmplabJenkins removed a comment on pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132052 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132052/testReport)** for PR 30567 at commit [`ba54f31`](https://github.com/apache/spark/commit/ba54f31f81b6d832e69fe86da4313c2688fb141c).
    * 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] cloud-fan commented on a change in pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala
##########
@@ -116,17 +116,30 @@ case class CreateViewCommand(
         CommandUtils.uncacheTableOrView(sparkSession, name.quotedString)
       }
       val aliasedPlan = aliasPlan(sparkSession, analyzedPlan)
-      catalog.createTempView(name.table, aliasedPlan, overrideIfExists = replace)
+      // If there is no sql text (e.g. from Dataset API), we will always store the analyzed plan
+      val tableDefinition = if (!conf.storeAnalyzedPlanForView && originalText.nonEmpty) {
+        TemporaryViewRelation(
+          prepareTemporaryView(name, sparkSession, analyzedPlan, aliasedPlan.schema))
+      } else {
+        aliasedPlan
+      }
+      catalog.createTempView(name.table, tableDefinition, overrideIfExists = replace)
     } else if (viewType == GlobalTempView) {
+      val db = sparkSession.sessionState.conf.getConf(StaticSQLConf.GLOBAL_TEMP_DATABASE)
+      val globalTempView = TableIdentifier(name.table, Option(db))

Review comment:
       the name is weird. how about `viewIdent`




----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -1489,6 +1489,15 @@ object SQLConf {
       .booleanConf
       .createWithDefault(false)
 
+  val STORE_ANALYZED_PLAN_FOR_VIEW =
+    buildConf("spark.sql.legacy.storeAnalyzedPlanForView")
+      .internal()
+      .doc("When true, analyzed plan instead of sql text will be stored when creating " +

Review comment:
       sql -> SQL




----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132086 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132086/testReport)** for PR 30567 at commit [`f049fa1`](https://github.com/apache/spark/commit/f049fa1c59d42641bb404081bd7e805efeb1089a).


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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] cloud-fan commented on a change in pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala
##########
@@ -237,6 +250,32 @@ case class CreateViewCommand(
       comment = comment
     )
   }
+
+  /**
+   * Returns a [[CatalogTable]] that contains information for temporary view.
+   * Generate the view-specific properties(e.g. view default database, view query output
+   * column names) and store them as properties in the CatalogTable, and also creates
+   * the proper schema for the view.
+   */
+  def prepareTemporaryView(
+      viewName: TableIdentifier,
+      session: SparkSession,
+      analyzedPlan: LogicalPlan,
+      aliasedSchema: StructType): CatalogTable = {

Review comment:
       `viewSchema`




----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132168 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132168/testReport)** for PR 30567 at commit [`8c62b72`](https://github.com/apache/spark/commit/8c62b7215a64dd88c8ab02af06ccf3174d9b8f78).
    * 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] SparkQA commented on pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132055 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132055/testReport)** for PR 30567 at commit [`a0ab11d`](https://github.com/apache/spark/commit/a0ab11d260dbe539f7fc62b71dde6d27ced8ce5f).
    * 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] cloud-fan commented on a change in pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/plans/logical/basicLogicalOperators.scala
##########
@@ -467,6 +488,21 @@ object View {
     sqlConf.setConf(SQLConf.MAX_NESTED_VIEW_DEPTH, activeConf.maxNestedViewDepth)
     sqlConf
   }
+
+  def fromCatalogTable(

Review comment:
       This can be put in `SessionCatalog`




----------------------------------------------------------------
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] linhongliu-db commented on pull request #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

Posted by GitBox <gi...@apache.org>.
linhongliu-db commented on pull request #30567:
URL: https://github.com/apache/spark/pull/30567#issuecomment-738571704


   The failed tests are all flaky thrift server  cases, should not be caused by this PR.
   https://github.com/apache/spark/pull/30567/checks?check_run_id=1496528107


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


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


----------------------------------------------------------------
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] cloud-fan commented on pull request #30567: [SPARK-33142][SPARK-33647][SQL] Store SQL text for SQL temp view

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #30567:
URL: https://github.com/apache/spark/pull/30567#issuecomment-738602132


   thanks, merging to master! please address these minor comments in a followup.


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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


   **[Test build #132038 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132038/testReport)** for PR 30567 at commit [`09419a6`](https://github.com/apache/spark/commit/09419a6fa82d957d10a65ca9a5fd144db603a206).
    * This patch **fails Spark unit tests**.
    * This patch merges cleanly.
    * This patch adds the following public classes _(experimental)_:
     * `case class TemporaryViewRelation(tableMeta: CatalogTable) extends LeafNode `


----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






----------------------------------------------------------------
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 #30567: [SPARK-33142][SQL] Store SQL text for SQL temp view

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






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