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.