apache / apache/beam

[Bug]: Reject illformed GBK Coders

Open
#21,935 6 comments 0 reactions 0 assignees View on GitHub
bug core java P2
Dominant language
Java
Stars
8.7k
Forks
4.7k
Avg merge
1d 20h
Merged PRs (30d)
196

Description

### What happened?

```
p.apply(
Create.of(KV.of("X", "Y"))
.withCoder(KvCoder.of(StringUtf8Coder.of(), StringUtf8Coder.of())))
.apply(GroupByKey.create())
.setCoder(
SerializableCoder.of(
TypeDescriptors.kvs(
TypeDescriptors.strings(),
TypeDescriptors.iterables(TypeDescriptors.strings()))));
```

The pipeline above exemplifies how it is, at the moment, acceptable to author pipelines with opaque input/output GBK coders whose semantics clearly violate that of Beam's programming model.
Pipelines of this kind should be rejected by SDKs during pipeline creation time itself.

### Issue Priority

Priority: 1

### Issue Component

Component: sdk-java-core

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.