use of org.apache.storm.sql.runtime.streams.functions.StreamsScanTupleValueMapper in project storm by apache.
the class StreamsStreamScanRel method streamsPlan.
@Override
public void streamsPlan(StreamsPlanCreator planCreator) throws Exception {
String sourceName = Joiner.on('.').join(getTable().getQualifiedName());
Map<String, ISqlStreamsDataSource> sources = planCreator.getSources();
if (!sources.containsKey(sourceName)) {
throw new RuntimeException("Cannot find table " + sourceName);
}
List<String> fieldNames = getRowType().getFieldNames();
final Stream<Values> finalStream = planCreator.getStreamBuilder().newStream(sources.get(sourceName).getProducer(), new StreamsScanTupleValueMapper(fieldNames), parallelismHint);
planCreator.addStream(finalStream);
}
Aggregations