flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-933) Add an input format to read primitive types directly (not through tuples)
Date Thu, 14 Aug 2014 18:54:12 GMT

    [ https://issues.apache.org/jira/browse/FLINK-933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14097377#comment-14097377
] 

ASF GitHub Bot commented on FLINK-933:
--------------------------------------

Github user StephanEwen commented on the pull request:

    https://github.com/apache/incubator-flink/pull/47#issuecomment-52226058
  
    Instread of having a separate format to maintain, you could simply read a tuple-1 and
then unwrap the type. That way you would only need the function in DataSet
    
    ```
    public <X> DataSet<X> readBasicTypeFile(String filePath, Class<X> typeClass)
{
        return readCsv(filePath).types(typeClass).map(new Unwrapper());
    }
    ```
    
    You would loose control over the data source though, because the returned type is the
map operator.


> Add an input format to read primitive types directly (not through tuples)
> -------------------------------------------------------------------------
>
>                 Key: FLINK-933
>                 URL: https://issues.apache.org/jira/browse/FLINK-933
>             Project: Flink
>          Issue Type: Bug
>            Reporter: Stephan Ewen
>            Assignee: Mingliang Qi
>            Priority: Minor
>              Labels: easyfix, features, starter
>
> Right now, reading primitive types goes either through custom formats (work intensive),
or through CSV inputs. The latter return tuples.
> To read a sequence of primitives, you need to go though Tuple1, which is clumsy.
> I would suggest to add an input format to read primitive types line wise (or otherwise
delimited), and also add a method to the environment for that.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message