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
[SPEC] Allow nested struct fields in SchemaDatasetFacet #2548
[SPEC] Allow nested struct fields in SchemaDatasetFacet #2548
Conversation
It looks like TypeResolver currently cannot handle recursive types |
@JDarDagran you had some ideas around nested types 🙂 |
064cfb6
to
9dae896
Compare
I did similar change to |
Any suggestions? My specialization is mostly Python, not Java. |
@JDarDagran @dolfinus It makes sense to support collection alike structures as well. I like the |
@pawel-big-lebowski @JDarDagran Could we move this discussion to #2051? |
3acf056
to
bdc04fe
Compare
bdc04fe
to
db2dabe
Compare
aaa7da5
to
c0a0115
Compare
6d4ee3b
to
0c208dc
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. Additional details and impacted files@@ Coverage Diff @@
## main #2548 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 5 5
Lines 173 173
=========================================
Hits 173 173 ☔ View full report in Codecov by Sentry. |
0c208dc
to
a5ee679
Compare
a5ee679
to
573f0c9
Compare
Ok, TypeResolver now can handle self-referencing types. Current implementation can break Java client backwards compatibility because method |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dolfinus that's fantastic you've made it to fix bug with recursive resolving in Java generator. I'm leaving review of this to @mobuchowski and @pawel-big-lebowski.
For me the change from SchemaDatasetFacetFields
to SchemaDatasetFacetField
is natural. More than that - I believe generator should change plural forms to singular in such cases (you can check my PR as an example)
573f0c9
to
b2c3387
Compare
I've removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's a test suite io.openlineage.client.OpenLineageTest
which verifies how the generated OpenLineage object serialises to Json. Tests within that suite create programatically OL object, serialise & deserialise it, and then compare if those objects have same values.
Normally we don't such tests when modifying a facet. However, it makes sense now as new type is added to java poet generator. Additional advantage of this approach is that is shows how convenient it is to use the newly generated method (how to produce nested schema in java client)
...n/flink/shared/src/test/java/io/openlineage/flink/visitor/FlinkKafkaConsumerVisitorTest.java
Outdated
Show resolved
Hide resolved
client/java/generator/src/main/java/io/openlineage/client/TypeResolver.java
Show resolved
Hide resolved
7dbe3b9
to
8b1f762
Compare
Signed-off-by: Martynov Maxim <martinov_m_s_@mail.ru>
8b1f762
to
5287387
Compare
I've added tests for serialization/deserialization to |
Problem
Closes: #2051
Solution
One-line summary:
Allow nested fields support to
SchemaDatasetFacet
Checklist
SPDX-License-Identifier: Apache-2.0
Copyright 2018-2023 contributors to the OpenLineage project