Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18421#discussion_r124178671
  
    --- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/execution/SparkSqlParserSuite.scala
 ---
    @@ -239,18 +239,20 @@ class SparkSqlParserSuite extends AnalysisTest {
           AnalyzeTableCommand(TableIdentifier("t"), noscan = false))
         assertEqual("analyze table t compute statistics noscan",
           AnalyzeTableCommand(TableIdentifier("t"), noscan = true))
    -    assertEqual("analyze table t partition (a) compute statistics nOscAn",
    +    assertEqual("analyze table t compute statistics nOscAn",
           AnalyzeTableCommand(TableIdentifier("t"), noscan = true))
     
    -    // Partitions specified - we currently parse them but don't do 
anything with it
    +    // Partitions specified
         assertEqual("ANALYZE TABLE t PARTITION(ds='2008-04-09', hr=11) COMPUTE 
STATISTICS",
    -      AnalyzeTableCommand(TableIdentifier("t"), noscan = false))
    +      AnalyzeTableCommand(TableIdentifier("t"), noscan = false,
    +        partitionSpec = Some(Map("ds" -> "2008-04-09", "hr" -> "11"))))
         assertEqual("ANALYZE TABLE t PARTITION(ds='2008-04-09', hr=11) COMPUTE 
STATISTICS noscan",
    -      AnalyzeTableCommand(TableIdentifier("t"), noscan = true))
    -    assertEqual("ANALYZE TABLE t PARTITION(ds, hr) COMPUTE STATISTICS",
    -      AnalyzeTableCommand(TableIdentifier("t"), noscan = false))
    -    assertEqual("ANALYZE TABLE t PARTITION(ds, hr) COMPUTE STATISTICS 
noscan",
    -      AnalyzeTableCommand(TableIdentifier("t"), noscan = true))
    +      AnalyzeTableCommand(TableIdentifier("t"), noscan = true,
    +        partitionSpec = Some(Map("ds" -> "2008-04-09", "hr" -> "11"))))
    +    intercept("ANALYZE TABLE t PARTITION(ds, hr) COMPUTE STATISTICS",
    --- End diff --
    
    This should be legal based on the description of Hive? 
    
    https://cwiki.apache.org/confluence/display/Hive/StatsDev


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to