Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-22637

CatalogImpl.refresh() has quadratic complexity for a view

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.2.2, 2.3.0
    • Component/s: SQL
    • Labels:
      None

      Description

      org.apache.spark.sql.internal.CatalogImpl.refreshTable uses foreach(..) to refresh all tables in a view. This traverses all nodes in the subtree and calls LogicalPlan.refresh() on these nodes. However LogicalPlan.refresh() is also refreshing its children, as a result refreshing a large view can be quite expensive.

        Attachments

          Activity

            People

            • Assignee:
              hvanhovell Herman van Hovell
              Reporter:
              hvanhovell Herman van Hovell
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: