[
https://issues.apache.org/jira/browse/CALCITE-3560?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andrei Sereda updated CALCITE-3560:
-----------------------------------
Description:
Currently calcite Source interface can be built only from
[File|https://docs.oracle.com/javase/8/docs/api/java/io/File.html] or
[URL|https://docs.oracle.com/javase/8/docs/api/java/net/URL.html]. This forces
data to be stored on disk or accessed remotely using URL api.
This proposal adds another Source implementation on the top of
[CharSource|https://guava.dev/releases/19.0/api/docs/com/google/common/io/CharSource.html]
so calcite adapters can operate on in-memory elements like String or generic
text sources.
was:
Currently CSV Adapter requires data to be stored on disk or remotely because
table constructor argument is
[URL|https://docs.oracle.com/javase/8/docs/api/java/net/URL.html] or
[File|https://docs.oracle.com/javase/8/docs/api/java/io/File.html]
Change CSV and File adapter to accept more generic source like
[Readable|https://docs.oracle.com/javase/8/docs/api/java/lang/Readable.html] or
[InputStream|https://docs.oracle.com/javase/9/docs/api/java/io/InputStream.html]
(rather their factory equivalent like
[CharSource|https://guava.dev/releases/19.0/api/docs/com/google/common/io/CharSource.html])
so adapters can operate on in-memory elements like String.
> Allow generic data source (eg. CharSource) in CSVAdapter and FileAdapter(s)
> ---------------------------------------------------------------------------
>
> Key: CALCITE-3560
> URL: https://issues.apache.org/jira/browse/CALCITE-3560
> Project: Calcite
> Issue Type: Improvement
> Components: csv-adapter, file-adapter
> Affects Versions: 1.21.0
> Reporter: Andrei Sereda
> Assignee: Andrei Sereda
> Priority: Major
>
> Currently calcite Source interface can be built only from
> [File|https://docs.oracle.com/javase/8/docs/api/java/io/File.html] or
> [URL|https://docs.oracle.com/javase/8/docs/api/java/net/URL.html]. This
> forces data to be stored on disk or accessed remotely using URL api.
> This proposal adds another Source implementation on the top of
> [CharSource|https://guava.dev/releases/19.0/api/docs/com/google/common/io/CharSource.html]
> so calcite adapters can operate on in-memory elements like String or generic
> text sources.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)