-
Notifications
You must be signed in to change notification settings - Fork 13.4k
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
[FLINK-36625] add lineage helper class for connector integration #25712
base: master
Are you sure you want to change the base?
[FLINK-36625] add lineage helper class for connector integration #25712
Conversation
8171f17
to
87538a2
Compare
87538a2
to
edbdb1d
Compare
@PublicEvolving | ||
public interface TypeDatasetFacet extends LineageDatasetFacet { | ||
|
||
TypeInformation getTypeInformation(); |
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.
* Returns a type dataset facet or `Optional.empty` in case an implementing class is not able to | ||
* resolve type. | ||
*/ | ||
Optional<TypeDatasetFacet> getTypeDatasetFacet(); |
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.
I see this is a new interface but it is not referenced in the fix, what is the thinking here?
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.
This interface is mainly for some connector in which return type is provided by internal class rather than the source/sink directly.
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.
Thanks for the explanation. It would be good to understand when a connector author should use this interface. Could we add documentation around when this and the utility classes could/ should be used ?
return datasetOf(name, namespace, Collections.singletonList(typeDatasetFacet)); | ||
} | ||
|
||
public static LineageDataset datasetOf( |
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.
I wonder if these datasetOf constructor methods can be put in DefaultLineageDataset or a class that creates DefaultLineageDataset , maybe a DefaultLineageDatasetProvider
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.
It is mainly to make the LineageDataset creation easier and simplify the code in each of connectors.
edbdb1d
to
7771506
Compare
Reviewed by Chi on 05/12/24. Asked submitter questions. Requests documentation be updated on how connector authors should / could use this helper class. |
@davidradl |
After this PR is merged, I will update this PR #25762. |
What is the purpose of the change
Add helper classes in stream java api for lineage integration in connectors.
Brief change log
Verifying this change
This change added tests and can be verified as follows:
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (no)Documentation