From 78fd591a4687ffbb7eae26833d4772363f835676 Mon Sep 17 00:00:00 2001 From: ulysses-you Date: Thu, 18 Mar 2021 12:48:19 +0000 Subject: [PATCH] [SPARK-34766][SQL][3.1] Do not capture maven config for views MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit backport [#31856](https://github.com/apache/spark/pull/31856) for branch-3.1 ### What changes were proposed in this pull request? Skip capture maven repo config for views. ### Why are the changes needed? Due to the bad network, we always use the thirdparty maven repo to run test. e.g., ``` build/sbt "test:testOnly *SQLQueryTestSuite" -Dspark.sql.maven.additionalRemoteRepositories=xxxxx ``` It's failed with such error msg ``` [info] - show-tblproperties.sql *** FAILED *** (128 milliseconds) [info] show-tblproperties.sql [info] Expected "...rredTempViewNames [][]", but got "...rredTempViewNames [][ [info] view.sqlConfig.spark.sql.maven.additionalRemoteRepositories xxxxx]" Result did not match for query #6 [info] SHOW TBLPROPERTIES view (SQLQueryTestSuite.scala:464) ``` It's not necessary to capture the maven config to view since it's a session level config.   ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? manual test pass ``` build/sbt "test:testOnly *SQLQueryTestSuite" -Dspark.sql.maven.additionalRemoteRepositories=xxx ``` Closes #31856 from ulysses-you/skip-maven-config. Authored-by: ulysses-you Signed-off-by: Kent Yao Closes #31879 from ulysses-you/SPARK-34766-3-1. Authored-by: ulysses-you Signed-off-by: Wenchen Fan --- .../scala/org/apache/spark/sql/execution/command/views.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala index ef0e90d97ae1c..620553c17d342 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/command/views.scala @@ -351,7 +351,8 @@ object ViewHelper { "spark.sql.codegen.", "spark.sql.execution.", "spark.sql.shuffle.", - "spark.sql.adaptive.") + "spark.sql.adaptive.", + SQLConf.ADDITIONAL_REMOTE_REPOSITORIES.key) private val configAllowList = Seq( SQLConf.DISABLE_HINTS.key