use of com.facebook.presto.sql.planner.plan.SampleNode in project presto by prestodb.
the class RelationPlanner method visitSampledRelation.
@Override
protected RelationPlan visitSampledRelation(SampledRelation node, Void context) {
RelationPlan subPlan = process(node.getRelation(), context);
double ratio = analysis.getSampleRatio(node);
PlanNode planNode = new SampleNode(getSourceLocation(node), idAllocator.getNextId(), subPlan.getRoot(), ratio, SampleNodeUtil.fromType(node.getType()));
return new RelationPlan(planNode, analysis.getScope(node), subPlan.getFieldMappings());
}
Aggregations