Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/15090#discussion_r80638681
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/internal/SessionState.scala ---
@@ -186,13 +187,18 @@ private[sql] class SessionState(sparkSession:
SparkSession) {
}
/**
- * Analyzes the given table in the current database to generate
statistics, which will be
+ * Analyzes the given table in the current database to generate
table-level statistics, which
+ * will be used in query optimizations.
+ */
+ def analyzeTable(tableIdent: TableIdentifier, noscan: Boolean = true):
Unit = {
+ AnalyzeTableCommand(tableIdent, noscan).run(sparkSession)
+ }
+
+ /**
+ * Analyzes the given columns in the table to generate column-level
statistics, which will be
* used in query optimizations.
- *
- * Right now, it only supports catalog tables and it only updates the
size of a catalog table
- * in the external catalog.
*/
- def analyze(tableName: String, noscan: Boolean = true): Unit = {
--- End diff --
actually this method is never used....
We should keep it unchanged in this PR, and remove it in follow-up
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]