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-22275][table] Support random past for timestamp types in datagen connector #15703
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 c6072f7 (Fri May 28 11:09:24 UTC 2021) ✅no 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:
|
@flinkbot attention @wuchong @lirui-apache |
@wuchong PTAL. |
...ink-table-api-java-bridge/src/main/java/org/apache/flink/table/factories/DataGenOptions.java
Outdated
Show resolved
Hide resolved
...ava-bridge/src/test/java/org/apache/flink/table/factories/DataGenTableSourceFactoryTest.java
Show resolved
Hide resolved
@luoyuxia Thanks for your comments, fixed them. |
Introduce a `max-past` duration option for timestamp type fields. If the `max-past` is specified, it will resolve a past timestamp relative to the current timestamp of the local machine. You can use it to achieve the out-of-order effect.
886a056
to
68074dc
Compare
...va-bridge/src/main/java/org/apache/flink/connector/datagen/table/RandomGeneratorVisitor.java
Show resolved
Hide resolved
Thanks @wuchong , i've pushed the fix. PTAL |
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.
I will merge it once build is passed. |
Thanks @wuchong |
What is the purpose of the change
Introduce a
max-past
duration option for timestamp type fields. If themax-past
is specified, it will resolve a past timestamp relative to the current timestamp of the local machine.You can use it to achieve the out-of-order effect.
Brief change log
max-past
option for timestamp types in datagen connector.Verifying this change
This change added tests and can be verified as follows:
max-past
option is available.Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: (no)Documentation