Skip to content

Commit

Permalink
Enable fusion of operators for queries with SYSTEM sampling
Browse files Browse the repository at this point in the history
We perform fusion of scan/filter/project operator for queries with SYSTEM sampling technique.
  • Loading branch information
Praveen2112 authored and martint committed Jan 27, 2019
1 parent 950a56c commit 7c1250a
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1181,6 +1181,18 @@ private PhysicalOperation visitScanFilterAndProject(
channel++;
}
}
//TODO: This is a simple hack, it will be replaced when we add ability to push down sampling into connectors.
// SYSTEM sampling is performed in the coordinator by dropping some random splits so the SamplingNode can be skipped here.
else if (sourceNode instanceof SampleNode) {
SampleNode sampleNode = (SampleNode) sourceNode;
checkArgument(sampleNode.getSampleType() == SampleNode.Type.SYSTEM, format("%w sampling is not supported", sampleNode.getSampleType()));
return visitScanFilterAndProject(context,
planNodeId,
sampleNode.getSource(),
filterExpression,
assignments,
outputSymbols);
}
else {
// plan source
source = sourceNode.accept(this, context);
Expand Down

0 comments on commit 7c1250a

Please sign in to comment.