Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Support Java 14 records in SchemaCoder #27802

Open
1 of 15 tasks
Gadiguibou opened this issue Aug 2, 2023 · 1 comment
Open
1 of 15 tasks

[Feature Request]: Support Java 14 records in SchemaCoder #27802

Gadiguibou opened this issue Aug 2, 2023 · 1 comment

Comments

@Gadiguibou
Copy link
Contributor

What would you like to happen?

The current JavaBeanSchema and JavaFieldSchema do not support working with Java 14 records by default because the record components are private final and the accessor methods do not conform to the Java bean convention (field() instead of getField()).

A new schema class for the schema coder could be created to support coding Java 14 records. Java records are especially well suited as intermediate data structures in beam pipelines because of their automatically generated hash, equals, and toString methods as well as their immutability. This would reduce boilerplate which inevitably causes issues down the line as everyone reimplements the same methods with varying degrees of correctness and uses code generation tools with poorly documented semantics.

Issue Priority

Priority: 3 (nice-to-have improvement)

Issue Components

  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Samza Runner
  • Component: Twister2 Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner
@aromanenko-dev
Copy link
Contributor

I just wanted to mention that all Java Beam artifacts are still built with Java 8. So I'm not sure that it's possible to do until Beam will move to Java 14.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants