GitHub user cloud-fan opened a pull request:
https://github.com/apache/spark/pull/15568
[SPARK-18028][SQL] simplify TableFileCatalog
## What changes were proposed in this pull request?
Simplify/cleanup TableFileCatalog:
1. pass a `CatalogTable` instead of `databaseName` and `tableName` into
`TableFileCatalog`, so that we don't need to fetch table metadata from
metastore again
2. In `TableFileCatalog.filterPartitions0`, DO NOT set
`PartitioningAwareFileCatalog.BASE_PATH_PARAM`. According to the
[classdoc](https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/PartitioningAwareFileCatalog.scala#L189-L209),
the default value of `basePath` already satisfies our need. What's more, if we
set this parameter, we may break the case 2 which is metioned in the classdoc.
3. add `equals` and `hashCode` to `TableFileCatalog`
4. add `SessionCatalog.listPartitionsByFilter` which handles case
sensitivit.
## 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 table-file-catalog
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/15568.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 #15568
----
commit bd808afd6fceeca6844e35de24a8efbfdae430ba
Author: Wenchen Fan <[email protected]>
Date: 2016-10-20T13:03:50Z
simplify TableFileCatalog
----
---
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]