Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-16026 Cost-based Optimizer Framework
  3. SPARK-20881

Clearly document the mechanism to choose between two sources of statistics

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.3.0
    • SQL
    • None

    Description

      Currently in Spark, statistics are generated by "analyze" commands.
      When user updates the table and collects stats in Hive, "totalSize"/"numRows" will be updated in metastore.
      Then, in spark side, table stats becomes stale and is different from Hive's stats.

      This is expected. Currently, we have two sources of statistics, i.e. Spark's stats and Hive's stats. In our design, once Spark's stats is available, we respect it over Hive's stats.
      If a user generated stats at Spark side, it's his responsibility to update Spark's stats by re-running analyze commands.

      But we should clearly document in related code the mechanism to choose between these two sources of stats.

      Attachments

        Activity

          People

            ZenWzh Zhenhua Wang
            ZenWzh Zhenhua Wang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: