aboutsummaryrefslogtreecommitdiff
path: root/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetFormatPlugin.java
diff options
context:
space:
mode:
authorHanifi Gunes <hanifigunes@gmail.com>2015-11-16 18:33:13 -0800
committerHanifi Gunes <hanifigunes@gmail.com>2015-11-24 16:50:34 -0800
commit367d74a65ce2871a1452361cbd13bbd5f4a6cc95 (patch)
tree0a9ee837d559649f0ebefce841313dc01d3bc80c /exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetFormatPlugin.java
parentbd39d30024431cf7eb2939f5b336b82c3b1dbe93 (diff)
DRILL-2618: handle queries over empty folders consistently so that they report table not found rather than failing.
Refactor FileSelection to eliminate redundancy, make it more managable Fix WorkspaceSchemaFactory to handle empty folders. Introduce ParquetFileSelection, a sub-class of FileSelection that carries along metadata cache Fix MagicStringMatcher so that it operate on files only. Unit test file selection
Diffstat (limited to 'exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetFormatPlugin.java')
-rw-r--r--exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetFormatPlugin.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetFormatPlugin.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetFormatPlugin.java
index 91cd11255..4932aafb4 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetFormatPlugin.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetFormatPlugin.java
@@ -234,9 +234,9 @@ public class ParquetFormatPlugin implements FormatPlugin{
// file:/a/b. The reason is that the file names above have been created in the form
// /a/b/c.parquet and the format of the selection root must match that of the file names
// otherwise downstream operations such as partition pruning can break.
- Path metaRootPath = Path.getPathWithoutSchemeAndAuthority(metaRootDir.getPath());
- return new FileSelection(fileNames, metaRootPath.toString(), metadata, /* save metadata for future use */
- selection.getFileStatusList(fs));
+ final Path metaRootPath = Path.getPathWithoutSchemeAndAuthority(metaRootDir.getPath());
+ final FileSelection newSelection = FileSelection.create(null, fileNames, metaRootPath.toString());
+ return ParquetFileSelection.create(newSelection, metadata);
} else {
// don't expand yet; ParquetGroupScan's metadata gathering operation
// does that.