I'm able to execute a query against a streaming data source (Apache Pulsar, based my adapter on the Kafka adapter) using the approach outlined here but the results cannot be enumerated.
I found some discussion in a Calcite JIRA that led to me to EnumerableInterpreter, but I can't figure out how to use it. My planner has the correct rules:
// select stream MESSAGEID from PULSARTRADES
[Logical plan]
LogicalDelta, id = 5
LogicalProject(ROWTIME=[$0], MESSAGEID=[$1], ENTITYTYPE=[$2], JSONPAYLOAD=[$3]), id = 4
LogicalTableScan(table=[[PULSARTRADES]]), id = 1
[Physical plan]
EnumerableInterpreter, id = 36
BindableTableScan(table=[[PULSARTRADES, (STREAM)]]), id = 29
I struggling to see how to replace the bind() call in the code I linked to so that have something that is enumerable. Any advice?
As an aside (maybe worth a different question?) I tried using the JDBC driver but it only emits a row when the next match is found. So with no where criteria it is always one event behind, and with a where criteria it is always one match behind. Not usable in my scenario, hence why I'm looking at Interpreter/EnumerableInterpreter to bypass JDBC.