Create a better Schema builder
Open
core
java
P3
sub-task
- Dominant language
- Java
- Stars
- 8.7k
- Forks
- 4.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 196
Description
Right now the Schema builder class is a bit verbose to use. The AddFields transform already contains a nicer way of building schemas, but it's coupled to that transform. We should refactor that code and make it available in the Schema builder. That would allow coder of the form
Schema schema = Schema.builder()
.addField("a", INT32)
.addField("a.b", STRING)
.addField("a.c", INT32).build();
Which is much more concise for nested fields.
Imported from Jira [BEAM-7334](https://issues.apache.org/jira/browse/BEAM-7334). Original Jira may contain additional context.
Reported by: reuvenlax.
Subtask of issue #18898
Contributor guide
Assessment
This issue has not been assessed yet.