Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
*/
package org.apache.drill.exec.planner;

import org.apache.hadoop.fs.Path;

/**
* Class defines a single partition in a DFS table.
*/
Expand All @@ -27,6 +29,10 @@ public class DFSPartitionLocation implements PartitionLocation {
public DFSPartitionLocation(int max, String selectionRoot, String file) {
this.file = file;
this.dirs = new String[max];

// strip the scheme and authority if they exist
selectionRoot = Path.getPathWithoutSchemeAndAuthority(new Path(selectionRoot)).toString();

int start = file.indexOf(selectionRoot) + selectionRoot.length();
String postPath = file.substring(start);
if (postPath.length() == 0) {
Expand Down