spark-instrumented-optimizer/sql/catalyst/src/main
Wenchen Fan 84a3399908 [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 sensitivity.

## How was this patch tested?

existing tests.

Author: Wenchen Fan <wenchen@databricks.com>

Closes #15568 from cloud-fan/table-file-catalog.
2016-10-25 08:42:21 +08:00
..
antlr4/org/apache/spark/sql/catalyst/parser [SPARK-17338][SQL] add global temp view 2016-10-10 15:48:57 +08:00
java/org/apache/spark/sql [SPARK-17864][SQL] Mark data type APIs as stable (not DeveloperApi) 2016-10-11 15:35:52 +08:00
scala/org/apache/spark/sql [SPARK-18028][SQL] simplify TableFileCatalog 2016-10-25 08:42:21 +08:00