use of io.trino.sql.planner.plan.SampleNode in project trino by trinodb.
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(idAllocator.getNextId(), subPlan.getRoot(), ratio, SampleNode.Type.fromType(node.getType()));
return new RelationPlan(planNode, analysis.getScope(node), subPlan.getFieldMappings(), outerContext);
}
Aggregations