vladanvasi-db commented on code in PR #60169:
URL: https://github.com/apache/spark/pull/60169#discussion_r4507571495


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/KeepLegacyOutputs.scala:
##########
@@ -45,4 +44,19 @@ object KeepLegacyOutputs extends Rule[LogicalPlan] {
       }
     }
   }
+
+  /** Applies the legacy SHOW TABLES schema without changing output expression 
IDs. */

Review Comment:
   Applied in 
[`885fc63c0510`](https://github.com/apache/spark/commit/885fc63c0510d830c8dbb7eaecb3b13f267e930a).
 The doc now names `spark.sql.legacy.keepCommandOutputSchema`, states that the 
plan is returned unchanged when it is off, and distinguishes the unconditional 
rename helper.



##########
sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ShowCommandHelper.scala:
##########
@@ -0,0 +1,63 @@
+/*
+ * 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.catalyst.analysis
+
+import org.apache.spark.sql.catalyst.SQLConfHelper
+import org.apache.spark.sql.catalyst.plans.logical.{LogicalPlan, 
ShowFunctions, ShowTables, ShowTablesExtended, ShowViews}
+import org.apache.spark.sql.connector.catalog.ViewCatalog
+import org.apache.spark.sql.errors.QueryCompilationErrors
+import org.apache.spark.sql.execution.command.{ShowFunctionsCommand, 
ShowTablesCommand, ShowViewsCommand}
+import org.apache.spark.sql.internal.SQLConf
+
+/** Lowers session-catalog SHOW commands, e.g. `SHOW VIEWS IN db` to 
[[ShowViewsCommand]]. */

Review Comment:
   Applied in 
[`885fc63c0510`](https://github.com/apache/spark/commit/885fc63c0510d830c8dbb7eaecb3b13f267e930a).
 The object and method docs now list the four supported commands, distinguish 
SHOW TABLE EXTENDED without PARTITION, and state that other plans pass through 
unchanged. The method doc also specifies direct-call output preparation and 
origin/tag responsibilities.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to