Skip to content

[FLINK-13368][python] Add Configuration Class for Python Table API to Align with Java.#9199

Closed
WeiZhong94 wants to merge 3 commits intoapache:masterfrom
WeiZhong94:FLINK-13368
Closed

[FLINK-13368][python] Add Configuration Class for Python Table API to Align with Java.#9199
WeiZhong94 wants to merge 3 commits intoapache:masterfrom
WeiZhong94:FLINK-13368

Conversation

@WeiZhong94
Copy link
Copy Markdown
Contributor

What is the purpose of the change

This pull request adds Configuration class, TableConfig.get_configuration() method and TableConfig.add_configuration() method for python Table API to align with Java.

Brief change log

  • Add Configuration class and relevant tests in pyflink.common package
  • Add get_configuration() and add_configuration() methods in TableConfig class
  • Extract the tests of TableConfig into a separate file

Verifying this change

This change is already covered by existing tests, such as test_configuration.py and test_table_config.py.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (no)
  • If yes, how is the feature documented? (python docs)

@flinkbot
Copy link
Copy Markdown
Collaborator

flinkbot commented Jul 22, 2019

Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community
to review your pull request. We will use this comment to track the progress of the review.

Automated Checks

Last check on commit ffc1258 (Tue Aug 06 15:45:25 UTC 2019)

Warnings:

  • No documentation files were touched! Remember to keep the Flink docs up to date!

Mention the bot in a comment to re-run the automated checks.

Review Progress

  • ✅ 1. The [description] looks good.
  • ✅ 2. There is [consensus] that the contribution should go into to Flink.
  • ❓ 3. Needs [attention] from.
  • ✅ 4. The change fits into the overall [architecture].
  • ✅ 5. Overall code [quality] is good.

Please see the Pull Request Review Guide for a full explanation of the review process.

Details
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 commands
The @flinkbot bot supports the following commands:

  • @flinkbot approve description to approve one or more aspects (aspects: description, consensus, architecture and quality)
  • @flinkbot approve all to approve all aspects
  • @flinkbot approve-until architecture to approve everything until architecture
  • @flinkbot attention @username1 [@username2 ..] to require somebody's attention
  • @flinkbot disapprove architecture to remove an approval you gave earlier

@flinkbot
Copy link
Copy Markdown
Collaborator

flinkbot commented Jul 22, 2019

CI report:

Copy link
Copy Markdown
Member

@sunjincheng121 sunjincheng121 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @WeiZhong94 !
I think It's better to merge the test methods just like java test case.
Best, Jincheng

from pyflink.testing.test_case_utils import PyFlinkTestCase


class ConfigurationTests(PyFlinkTestCase):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please merge the testcase just like Java, please see: ConfigurationTest

Copy link
Copy Markdown
Contributor

@dianfu dianfu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@WeiZhong94 Thanks a lot for the PR. Have left a few minor comments.

else:
self._j_configuration.addAll(other._j_configuration, prefix)

def clone(self):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should use copy and deepcopy instead.


def to_dict(self):
"""
Convert the configuration into a dict representation of string key-pair.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Convert -> Converts

@WeiZhong94
Copy link
Copy Markdown
Contributor Author

@sunjincheng121 Thanks a lot for your review! I have combined these test cases into one in the latest commit.

@WeiZhong94
Copy link
Copy Markdown
Contributor Author

@dianfu Thanks a lot for your review! I have addressed your comments.

@dianfu
Copy link
Copy Markdown
Contributor

dianfu commented Jul 23, 2019

@WeiZhong94 Thanks a lot for the update. LGTM to me. +1 from my side.

Copy link
Copy Markdown
Member

@sunjincheng121 sunjincheng121 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 to merged 👍
@flinkbot approve all

@asfgit asfgit closed this in 2d8ba48 Jul 23, 2019
asfgit pushed a commit that referenced this pull request Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants