GitHub user cloud-fan opened a pull request:
https://github.com/apache/spark/pull/16621
[SPARK-19265][SQL] make table relation cache general and does not depend on
hive
## What changes were proposed in this pull request?
We have a table relation plan cache in `HiveMetastoreCatalog`, which caches
a lot of things: file status, resolved data source, inferred schema, etc.
However, it doesn't make sense to limit this cache with hive support, we
should move it to SQL core module so that users can use this cache without hive
support.
It can also reduce the size of `HiveMetastoreCatalog`, so that it's easier
to remove it eventually.
main changes:
1. move the table relation cache to `SessionCatalog`
2. `SessionCatalog.lookupRelation` will return `SimpleCatalogRelation` and
the analyzer will convert it to `LogicalRelation` or `MetastoreRelation` later,
then `HiveSessionCatalog` doesn't need to override `lookupRelation` anymore
3. `FindDataSourceTable` will read/write the table relation cache.
## How was this patch tested?
existing tests.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/cloud-fan/spark plan-cache
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/16621.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 #16621
----
commit a7845cc54b95c9935801225a292bf87a08158bbe
Author: Wenchen Fan <[email protected]>
Date: 2017-01-17T15:03:33Z
make table relation cache general and does not depend on hive
----
---
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 [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]