use of org.apache.beam.sdk.extensions.sql.impl.rel.BeamTableFunctionScanRel in project beam by apache.
the class BeamTableFunctionScanRule method convert.
@Override
public RelNode convert(RelNode relNode) {
TableFunctionScan tableFunctionScan = (TableFunctionScan) relNode;
// only support one input for table function scan.
List<RelNode> inputs = new ArrayList<>();
checkArgument(relNode.getInputs().size() == 1, "Wrong number of inputs for %s, expected 1 input but received: %s", BeamTableFunctionScanRel.class.getSimpleName(), relNode.getInputs().size());
inputs.add(convert(relNode.getInput(0), relNode.getInput(0).getTraitSet().replace(BeamLogicalConvention.INSTANCE)));
return new BeamTableFunctionScanRel(tableFunctionScan.getCluster(), tableFunctionScan.getTraitSet().replace(BeamLogicalConvention.INSTANCE), inputs, tableFunctionScan.getCall(), null, tableFunctionScan.getCall().getType(), Collections.EMPTY_SET);
}
Aggregations