[
https://issues.apache.org/jira/browse/FLINK-5714?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15867972#comment-15867972
]
ASF GitHub Bot commented on FLINK-5714:
---------------------------------------
Github user twalthr commented on the issue:
https://github.com/apache/flink/pull/3273
I found another issue: We should use a `LinkedHashMap` otherwise the order
of fields and types is not guaranteed. I fixed it and will merge this now.
> Use a builder pattern for creating CsvTableSource
> -------------------------------------------------
>
> Key: FLINK-5714
> URL: https://issues.apache.org/jira/browse/FLINK-5714
> Project: Flink
> Issue Type: Improvement
> Components: Table API & SQL
> Reporter: Timo Walther
> Assignee: Jark Wu
>
> Right now, the constructor of the CsvTableSource can have up to 9 parameters.
> In Scala this might not be a problem because of default values, but Java
> doesn't have this functionality.
> I propose to have a builder pattern here:
> {code}
> CsvTableSource
> .builder()
> .field("myfield", Types.STRING)
> .field("myfield2", Types.INT)
> .quoteCharacter(';')
> .build()
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)