[ https://issues.apache.org/jira/browse/CALCITE-1227?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
zhen wang updated CALCITE-1227: ------------------------------- Comment: was deleted (was: thanks [~julianhyde], will clean up the PR once fished the remaining bits, reduce code repetitions. I still haven't figured out how to check for cancel. the new CsvStreamReader is pretty much isolated from other parts of the query, where can it get that query is cancelled ? AvaticaResultSet.java seems just ignore the cancel request. another thing if the block waiting is done at Reader. which means moveNext() method in Enumerator will block, which in turn prevents the last row being emitted. not sure if I miss anything. during testing, when continuous output is being emitted to console, CTRL+C did mange to stop the execution. so I will probably dig more to find out. but if you have the clue, let me know. ) > Add streaming CSV table > ----------------------- > > Key: CALCITE-1227 > URL: https://issues.apache.org/jira/browse/CALCITE-1227 > Project: Calcite > Issue Type: Bug > Reporter: Julian Hyde > Assignee: Julian Hyde > > Add a variant of CsvTable that can be streamed. It would serve as an example > of how to write stream adapters. > It would be like the CSV adapter, but watches a file and reports records > added to the end of the file (like the tail command). > You’d have to change {{CsvTable}} to implement {{StreamableTable}}, and > implement the {{Table stream()}} method to return a variant of the table that > is in “follow” mode. > It would probably be implemented by a variant of CsvEnumerator, but it is > getting its input in bursts, as the file is appended to. > You would still be able to use this adapter to read historical data from the > CSV file. Appending records to the file would make a nice demo. -- This message was sent by Atlassian JIRA (v6.3.4#6332)