Github user hyunsik commented on a diff in the pull request:
https://github.com/apache/tajo/pull/846#discussion_r45691190
--- Diff:
tajo-plan/src/main/java/org/apache/tajo/plan/rewrite/rules/PartitionedTableRewriter.java
---
@@ -216,7 +228,22 @@ public String toString() {
// Get all file status matched to a ith level path filter.
filteredPaths = toPathArray(fs.listStatus(filteredPaths,
filters[i]));
}
- return filteredPaths;
+
+ // Get partition keys and volume from the list of partition directories
+ partitionKeys = new String[filteredPaths.length];
+ for (int i = 0; i < partitionKeys.length; i++) {
+ Path path = filteredPaths[i];
+ startIdx =
path.toString().indexOf(getColumnPartitionPathPrefix(partitionColumns));
+ partitionKeys[i] = path.toString().substring(startIdx);
+ summary = fs.getContentSummary(path);
+ totalVolume += summary.getLength();
+ }
+
+ partitionContent.setPartitionPaths(filteredPaths);
--- End diff --
It can be refactored to use just the constructor instead of setters.
---
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.
---