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-17528][table] Remove RowData#get() and ArrayData#get() and use FieldGetter and ElementGetter instead #13653
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 324bdc2 (Thu Oct 15 13:23:13 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:
|
The failed e2e case is not stable recently. |
@@ -507,7 +507,8 @@ private void checkNoNull() { | |||
T[] values = (T[]) Array.newInstance(elementClass, size); | |||
for (int i = 0; i < size; i++) { | |||
if (!isNullAt(i)) { | |||
values[i] = (T) ArrayData.get(this, i, elementType); | |||
ArrayData.ElementGetter elementGetter = ArrayData.createElementGetter(elementType); |
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.
elementGetter
should be out of for loop.
@@ -58,7 +58,8 @@ public static GenericRowData toGenericRow( | |||
if (row.isNullAt(i)) { |
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.
Should move this class to test?
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.
Yes. I think so. Will move it.
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.
Looks good to me after azure passing
@flinkbot run azure |
1 similar comment
@flinkbot run azure |
@flinkbot run azure |
1 similar comment
@flinkbot run azure |
… instead This closes apache#13653
@flinkbot run azure |
1 similar comment
@flinkbot run azure |
… instead This closes apache#13653
Finally passed in my private Azure: https://dev.azure.com/imjark/Flink/_build/results?buildId=301&view=results Will merge this! |
What is the purpose of the change
Currently, we are using utility
RowData#get(RowData, int, LogicalType)
andArrayData#get(ArrayData, int, LogicalType)
to get the field/element objects. They have been deprecated since 1.11, we should replace them byRowData#FieldGetter
andArrayData#ElementGetter
.Brief change log
RowData#FieldGetter
andArrayData#ElementGetter
to replaceRowData#get(..)
andArrayData#get(..)
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (yes / no)Documentation