I’ve logged https://issues.apache.org/jira/browse/CALCITE-1227 
<https://issues.apache.org/jira/browse/CALCITE-1227>. Feel free to start 
implementing it!

> On May 4, 2016, at 8:56 AM, Julian Hyde <[email protected]> wrote:
> 
> It’s not straightforward to re-use a table adapter as a stream adapter. The 
> reason is that one query might want to see the past (the current contents of 
> the table) and another query might want to see the future (the stream of 
> records added from this point on).
> 
> I’m guessing that you want something like the CSV adapter that watches a file 
> and reports records added to the end of the file (like the tail command[1]). 
> 
> 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.
> 
> Hope that helps.
> 
> Julian
> 
> [1] https://en.wikipedia.org/wiki/Tail_(Unix) 
> <https://en.wikipedia.org/wiki/Tail_(Unix)>
> 
>> On May 2, 2016, at 3:15 AM, Toivo Adams <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> Hi,
>> 
>> One possibility is to modify CsvEnumerator
>> Opinions?
>> 
>> Thanks
>> Toivo
>> 
>> 2016-05-01 18:35 GMT+03:00 Toivo Adams <[email protected] 
>> <mailto:[email protected]>>:
>> 
>>> Hi,
>>> 
>>> Please help newbie.
>>> CSV works well reading files, but I want to read data from stream.
>>> Data is not fixed length, may be endless stream.
>>> 
>>> Any ideas how to accomplish this?
>>> Should I try to modify CsvTranslatableTable?
>>> Or should I take Cassandra adapter as example?
>>> 
>>> Initially data will be CSV but later Avro is also good candidate.
>>> 
>>> Thanks
>>> Toivo
>>> 
> 

Reply via email to