-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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-21641][python] Support 'useModules' and 'listFullModules' in PyFlink #15101
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 6420454 (Sat Mar 06 16:11:54 UTC 2021) 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:
|
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.
@LadyForest Thanks for the PR! LGTM overall. It would be great to also update the documentation: https://ci.apache.org/projects/flink/flink-docs-master/docs/dev/table/modules/
__all__ = ['ModuleEntry'] | ||
|
||
|
||
class ModuleEntry(object): |
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.
What about moving this class to module.py?
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.
What about moving this class to module.py?
+1.
Hi, @dianfu thanks for the comments. There is a separate Jira task FLINK-21300 to track docs update. It's a subtask of FLINK-21045. |
import org.apache.flink.table.module.Module; | ||
|
||
/** Mocking {@link Module} for Python tests. */ | ||
public class ModuleMock implements Module { |
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.
Could we reuse the ModuleMock defined in flink-table-api-java module? Could use _load_specific_flink_module_jars on how to load classes defined in test jar.
1. Move ModuleEntry to module.py 2. Reuse org.apache.flink.table.utils.ModuleMock
Hi @dianfu, I've updated the PR, and you can take a look after CI passes. |
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.
@LadyForest Thanks a lot for the update! LGTM. Will merge once the tests passed.
What is the purpose of the change
This pull request supports
useModules
andlistFullModules
in PyFlink to keep Table API consistent.Brief change log
useModules
andlistFullModules
inTableEnvironment
.ModuleEntry
for converting result ofuseModules
.ModuleMock
for testing.Verifying this change
This change added tests and can be verified as follows:
loadModule/unloadModule/listModules/useModules/listFullModules
fromEnvironmentAPICompletenessTests
.load_modules
andunload_modules
inTableEnvironmentTest
andBatchTableEnvironmentTests
.use_modules
andlist_full_modules
inTableEnvironmentTest
andBatchTableEnvironmentTests
.Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (yes / no)Documentation