[
https://issues.apache.org/jira/browse/CALCITE-7513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18079694#comment-18079694
]
Stephen Buergler commented on CALCITE-7513:
-------------------------------------------
hmm... if you change it so that StreamableTables can be ScannableTables then
CsvStreamScannableTable does a streaming output on non-stream queries.. because
the scan method on that type is set up to do stream stuff.
I kind of wish the DataContext had a variable or something that said if the
table is being asked to do a stream.
Changing CsvStreamScannableTable to only stream when it's the type returned by
the stream method makes it work fine I think.
If this change is done people who made the stream method return this might see
an unexpected change.
> Support tables that can be relational and streamable?
> -----------------------------------------------------
>
> Key: CALCITE-7513
> URL: https://issues.apache.org/jira/browse/CALCITE-7513
> Project: Calcite
> Issue Type: New Feature
> Components: core
> Affects Versions: 1.41.0
> Reporter: Stephen Buergler
> Priority: Minor
>
> I don't know much about calcite yet so if there is a reason to not do this
> let me know.
> Currently it looks like you can't make a Table implement ScannableTable and
> StreamableTable. It fails validation when you select from it because
> org.apache.calcite.prepare.RelOptTableImpl#supportsModality says the modality
> isn't supported. I think it would make more sense if that tested to see if
> the Table implements one of the selectable interfaces rather than the current
> {code:java}
> !(table instanceof StreamableTable)
> {code}
> .
--
This message was sent by Atlassian Jira
(v8.20.10#820010)