-
Notifications
You must be signed in to change notification settings - Fork 13k
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-16995][table-common] Add new data structure interfaces in table-common #11651
Conversation
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit 2345d03 (Tue Apr 07 03:08:18 UTC 2020) Warnings:
Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. The Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
Thanks @wuchong, yes, we can introduce formats again, but:
Another way is:
Just a suggestion. |
Hi @JingsongLi , I would prefer to refactor all of them together, not one by one. This will reduce the refactor work and review work.
We will have a follow up refactor PR soon. This situation will not last long.
This is on purpose to split the interface and refactoring into separete PRs. This PR just focuses on the user-facing APIs and Javadocs, to keep align with FLIP-95 proposal. So more people who care API can join in the reviewing. The following-up PR should focus on making planner 100% work on this new structures. |
Rebased and added |
Thanks for the PR @wuchong. I was writing a lot of JavaDocs in the last days and tried to also further improve them for the data structures. I push a commit to this branch. In particular it tries to:
If you don't like certain changes, feel free to undo them again. |
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 @twalthr for helping to improve the Javadoc. All of them looks good to me.
I only removed "This data structure is immutable" from Javadoc of StringData.
If you don't have any other concens, I would like to merge this then.
* and {@link CharType} in Flink Table/SQL. | ||
* An internal data structure representing data of {@link CharType} and {@link VarCharType}. | ||
* | ||
* <p>This data structure is immutable. |
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.
BinaryStringData is mutable, because it is lazy (de)serialized. The binary is lazily materialized when needed, so it's not thread-safe.
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.
@wuchong What I meant with immutable is that it does not provide any setters. Because GenericRowData
has setters. But I'm fine with removing it 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.
LGTM
} | ||
|
||
// big endian; consistent with BigInteger.toByteArray() | ||
byte[] bytes = new byte[8]; |
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.
Hi @wuchong , this is a wrong implementation here. Can you take https://issues.apache.org/jira/browse/FLINK-16922 and fix that?
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.
OK. Will do that in FLINK-16996.
What is the purpose of the change
This add the new data structure interfaces to table-common which has been discussed in FLIP-95.
The planner and connector refactoring will happen in a separate PR.
Brief change log
New interfaces and JavaDocs for all of them added.
Verifying this change
DecimalData
andTimestampData
, the corresponing tests will be moved to table-common when refactoring planner.Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (yes / no)Documentation