[
https://issues.apache.org/jira/browse/DRILL-7746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17124140#comment-17124140
]
ASF GitHub Bot commented on DRILL-7746:
---------------------------------------
sanel commented on a change in pull request #2085:
URL: https://github.com/apache/drill/pull/2085#discussion_r434062419
##########
File path:
contrib/storage-http/src/main/java/org/apache/drill/exec/store/http/HttpScanBatchCreator.java
##########
@@ -92,9 +92,16 @@ public void bind(ManagedScanFramework framework) { }
@Override
public ManagedReader<SchemaNegotiator> next() {
+ // Get the expected input type
+ String inputType = subScan.tableSpec().connectionConfig().inputType();
+
// Only a single scan (in a single thread)
if (count++ == 0) {
- return new HttpBatchReader(subScan);
+ if (inputType.equalsIgnoreCase("csv")) {
+ return new HttpCSVBatchReader(subScan);
+ } else {
+ return new HttpBatchReader(subScan);
+ }
Review comment:
Github won't let me leave the comment for `else` block down below, but
that `return null;` can go as default (without `else`).
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> Add REST API Ability to Accept CSV Input
> ----------------------------------------
>
> Key: DRILL-7746
> URL: https://issues.apache.org/jira/browse/DRILL-7746
> Project: Apache Drill
> Issue Type: Improvement
> Affects Versions: 1.18.0
> Reporter: Charles Givre
> Assignee: Charles Givre
> Priority: Major
> Fix For: 1.18.0
>
>
> This small PR adds the ability for the REST Storage Plugin to accept CSV as
> input in addition to JSON.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)