Github user ToivoAdams commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/420#discussion_r62807232
  
    --- Diff: 
nifi-nar-bundles/nifi-standard-bundle/nifi-standard-processors/src/main/java/org/apache/calcite/adapter/csv/CsvEnumerator2.java
 ---
    @@ -0,0 +1,303 @@
    +/*
    + * Licensed to the Apache Software Foundation (ASF) under one or more
    + * contributor license agreements.  See the NOTICE file distributed with
    + * this work for additional information regarding copyright ownership.
    + * The ASF licenses this file to you under the Apache License, Version 2.0
    + * (the "License"); you may not use this file except in compliance with
    + * the License.  You may obtain a copy of the License at
    + *
    + * http://www.apache.org/licenses/LICENSE-2.0
    + *
    + * Unless required by applicable law or agreed to in writing, software
    + * distributed under the License is distributed on an "AS IS" BASIS,
    + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    + * See the License for the specific language governing permissions and
    + * limitations under the License.
    + */
    +package org.apache.calcite.adapter.csv;
    +
    +import java.io.IOException;
    +import java.text.ParseException;
    +import java.util.ArrayList;
    +import java.util.Date;
    +import java.util.List;
    +import java.util.TimeZone;
    +
    +import org.apache.calcite.adapter.java.JavaTypeFactory;
    +import org.apache.calcite.linq4j.Enumerator;
    +import org.apache.calcite.rel.type.RelDataType;
    +import org.apache.calcite.util.Pair;
    +import org.apache.commons.lang3.time.FastDateFormat;
    +
    +import au.com.bytecode.opencsv.CSVReader;
    +
    +
    +/** Enumerator that reads from a CSV stream.
    + *
    + * @param <E> Row type
    + */
    +class CsvEnumerator2<E> implements Enumerator<E> {
    --- End diff --
    
    Yes, It’s modified Calcite CSV adapter.
    Current Calcite adapter supports only reading from java.io.File
    So CSV adapter is modified to support reading from java.io.InputStream
    
    Modified CSV adapter is currently intermediate code.
    In future Calcite should include CSV adapter which is able to read from 
java.io.InputStream
    I (or someone else) will try to create correct CSV adapter.
    
    And name CsvEnumerator2 means just second version of original CsvEnumerator
    Please see also Calcite 
https://mail-archives.apache.org/mod_mbox/calcite-dev/201605.mbox/browser  
Reading CSV data from Stream



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to