Schema inference parameterized types#32757
Conversation
97f7cde to
6e8fe64
Compare
|
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
d779bd9 to
a1bb67d
Compare
1957eea to
1366db3
Compare
ahmedabu98
left a comment
There was a problem hiding this comment.
Functionality looks sound and tests look great
Left some nits
There's few changes to public, non-internal, method signatures that are breaking though. Might make sense to overload these methods just in case (would also narrow down the scope of this PR)
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/ReflectUtils.java
Show resolved
Hide resolved
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/ReflectUtils.java
Outdated
Show resolved
Hide resolved
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/ReflectUtils.java
Show resolved
Hide resolved
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/FieldValueTypeInformation.java
Show resolved
Hide resolved
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/AutoValueUtils.java
Outdated
Show resolved
Hide resolved
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/POJOUtils.java
Show resolved
Hide resolved
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/ReflectUtils.java
Show resolved
Hide resolved
sdks/java/core/src/main/java/org/apache/beam/sdk/schemas/utils/StaticSchemaInference.java
Show resolved
Hide resolved
sdks/java/core/src/test/java/org/apache/beam/sdk/schemas/JavaBeanSchemaTest.java
Outdated
Show resolved
Hide resolved
sdks/java/core/src/test/java/org/apache/beam/sdk/schemas/JavaBeanSchemaTest.java
Show resolved
Hide resolved
|
@ahmedabu98 Any more comments? Are you ok with marking these classes as Internal, or do you prefer adding overloads? |
This reverts commit a50f91c.
|
I believe this change introduced a regression (see #32795) Iceberg unit and integration tests are failing with the following error: Tests are failing at HEAD, but passing when reverting this PR: #32802 |
|
Suspected culprit of breaking this one too https://github.com/apache/beam/actions/workflows/beam_PreCommit_Yaml_Xlang_Direct.yml?query=branch%3Amaster+is%3Acompleted |
|
The fix has been submitted - is that Yaml test still failing?
Separately we should figure out why none of those tests triggered on my
initial PR :(
…On Wed, Oct 16, 2024 at 6:00 PM Kenn Knowles ***@***.***> wrote:
Suspected culprit of breaking this one too
https://github.com/apache/beam/actions/workflows/beam_PreCommit_Yaml_Xlang_Direct.yml?query=branch%3Amaster+is%3Acompleted
—
Reply to this email directly, view it on GitHub
<#32757 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFAYJVJWYRWOHOV74QY6PS3Z34D4HAVCNFSM6AAAAABPZOTUP2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJYGI3TCNJYGE>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
|
Created an issue for the failing YAML tests: #32832 |
Yea we could see if there is a natural precommit trigger that would make sense. It may be that these are far enough apart in the codebase that postcommit is where we expect to catch it anyhow. Then we would roll back and roll forward touching a trigger file in |
…ed types" This reverts commit a50f91c.
…inference parameterized types"
Beam automatically infers schema for common Java types: POJOs, JavaBean, AutoValue, AVRO, among others. In addition for it's use with schema transforms, this also provides a simple, efficient way of using these types in PCollections without needing to construct a Coder. A frequent complaint has been that this inference did not work in the presence of generic type parameters. E.g. this means that while Beam can handle PCollections of this class:
@DefaultSchema(JavaFieldSchema.class)
class MyType {
String field1;
}
PCollection myTypes = read();
Schema inference would fail for this:
@DefaultSchema(JavaFieldSchema.class)
class MyType<T> {
T field1;
}
PCollection<MyType> myTypes = read();
This PR adds support for generic type parameters to schema inference for common types, addressing the above issue.