GitHub user hvanhovell opened a pull request:
https://github.com/apache/spark/pull/19837
[SPARK-22637][SQL] Only refresh a logical plan once.
## What changes were proposed in this pull request?
`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.
This PR just calls `LogicalPlan.refresh()` on the top node.
## How was this patch tested?
Existing tests.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/hvanhovell/spark SPARK-22637
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/19837.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #19837
----
commit 9c7a45cc8288ed03586902dc3ae5729b08cab0c5
Author: Herman van Hovell <[email protected]>
Date: 2017-11-28T21:12:34Z
Only refresh a logical plan once.
----
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]