[
https://issues.apache.org/jira/browse/BEAM-1446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15882293#comment-15882293
]
ASF GitHub Bot commented on BEAM-1446:
--------------------------------------
GitHub user aviemzur opened a pull request:
https://github.com/apache/beam/pull/2095
[BEAM-1446] Create with TypeDescriptor
Be sure to do all of the following to help us incorporate your contribution
quickly and easily:
- [ ] Make sure the PR title is formatted like:
`[BEAM-<Jira issue #>] Description of pull request`
- [ ] Make sure tests pass via `mvn clean verify`. (Even better, enable
Travis-CI on your fork and ensure the whole test matrix passes).
- [ ] Replace `<Jira issue #>` in the title with the actual Jira issue
number, if there is one.
- [ ] If this contribution is large, please file an Apache
[Individual Contributor License
Agreement](https://www.apache.org/licenses/icla.txt).
---
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/aviemzur/beam create-with-type-descriptor
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/beam/pull/2095.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #2095
----
commit 967ce50611285a148d0b86a7a12bc01077995d1d
Author: Aviem Zur <[email protected]>
Date: 2017-02-24T09:18:02Z
[BEAM-1446] Create with TypeDescriptor
----
> Create should take a TypeDescriptor as an alternative to explicitly
> specifying the Coder
> ----------------------------------------------------------------------------------------
>
> Key: BEAM-1446
> URL: https://issues.apache.org/jira/browse/BEAM-1446
> Project: Beam
> Issue Type: Improvement
> Components: sdk-java-core
> Reporter: Thomas Groh
> Assignee: Aviem Zur
> Priority: Minor
>
> {{getDefaultCreateCoder}} is provided with the Pipeline's {{CoderRegistry}},
> which enables it to use standard Coder Inference. For the construction of the
> Default Create Coder, explicitly providing the TypeDescriptor allows it to
> ask the CoderRegistry directly rather than attempting to reconstruct the
> TypeDescriptor based on the elements within the Create.
> This also makes some coder specifications significantly more terse, as the
> type signature must be respecified but the entire coder need not be
> constructed (e.g. {{KvCoder.of(VarIntCoder.of(), StringUtf8Coder.of());}}
> becomes {{new TypeDescriptor<KV<Integer, String>>() {};}}, which is at least
> somewhat simpler to type out.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)