drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From meh...@apache.org
Subject drill git commit: DRILL-4025: Create FileSelection object with the appropriate file statuses
Date Fri, 06 Nov 2015 06:22:03 GMT
Repository: drill
Updated Branches:
  refs/heads/master 511e54050 -> 1a2423347


DRILL-4025: Create FileSelection object with the appropriate file statuses


Project: http://git-wip-us.apache.org/repos/asf/drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/drill/commit/1a242334
Tree: http://git-wip-us.apache.org/repos/asf/drill/tree/1a242334
Diff: http://git-wip-us.apache.org/repos/asf/drill/diff/1a242334

Branch: refs/heads/master
Commit: 1a24233475ca46aaf2a49a5624b4042f088382f4
Parents: 511e540
Author: Mehant Baid <mehantr@gmail.com>
Authored: Mon Nov 2 14:26:43 2015 -0800
Committer: Mehant Baid <mehantr@gmail.com>
Committed: Thu Nov 5 22:04:30 2015 -0800

----------------------------------------------------------------------
 .../java/org/apache/drill/exec/store/dfs/FileSelection.java  | 8 ++++++++
 .../apache/drill/exec/store/parquet/ParquetFormatPlugin.java | 3 ++-
 2 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/1a242334/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java
index a0cea61..d17cfed 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSelection.java
@@ -83,6 +83,14 @@ public class FileSelection {
     this.selectionRoot = selectionRoot;
   }
 
+  public FileSelection(List<String> files, String selectionRoot,
+                       ParquetTableMetadata_v1 meta, List<FileStatus> statuses) {
+    this.files = files;
+    this.selectionRoot = selectionRoot;
+    this.parquetMeta = meta;
+    this.statuses = statuses;
+  }
+
   public boolean containsDirectories(DrillFileSystem fs) throws IOException {
     init(fs);
     for (FileStatus p : statuses) {

http://git-wip-us.apache.org/repos/asf/drill/blob/1a242334/exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/ParquetFormatPlugin.java
----------------------------------------------------------------------
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 0167700..c22392a 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
@@ -236,7 +236,8 @@ public class ParquetFormatPlugin implements FormatPlugin{
         // /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 */);
+        return new FileSelection(fileNames, metaRootPath.toString(), metadata, /* save metadata
for future use */
+            selection.getFileStatusList(fs));
       } else {
         // don't expand yet; ParquetGroupScan's metadata gathering operation
         // does that.


Mime
View raw message