flink icon indicating copy to clipboard operation
flink copied to clipboard

[FLINK-25284][Table SQL / API] Add proportion of null values to generate with datagen

Open snuyanzin opened this issue 4 years ago • 6 comments

What is the purpose of the change

The PR allows to specify the proportion of null values to generate with DataGen per field, like

CREATE TABLE Orders (
    order_number STRING,
    price        DECIMAL(32,2),
    buyer        ROW<id INT, last_name STRING>,
    order_time   TIMESTAMP(3),
    my_map       MAP<INT,STRING>,
    my_arrray    ARRAY<STRING>
) WITH (
   'connector' = 'datagen',
   'fields.order_number.null-rate' = '0.7',
   'fields.price.null-rate' = '1.0',
   'fields.order_time.null-rate' = '0.5',
   'fields.buyer.id.null-rate' = '0.5',
   'fields.buyer.null-rate' = '0.5',
   'fields.my_map.key.null-rate' = '0.5',
   'fields.my_map.null-rate' = '0.5',
   'fields.my_array.element.null-rate' = '0.1',
   'fields.my_array.null-rate' = '0.5'
);

Verifying this change

There have been added test cases to flink-table/flink-table-api-java-bridge/src/test/java/org/apache/flink/connector/datagen/table/types/DecimalDataRandomGeneratorTest.java

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, Kubernetes/Yarn, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

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

snuyanzin avatar Dec 14 '21 22:12 snuyanzin

CI report:

  • ac8c2ebd78820927cd1f1f2a34728c7eeadbadcb Azure: SUCCESS
Bot commands The @flinkbot bot supports the following commands:
  • @flinkbot run azure re-run the last Azure build

flinkbot avatar Dec 14 '21 22:12 flinkbot

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 47449f943151ff06ddc777edf50798901d3ea20b (Tue Dec 14 22:38:55 UTC 2021)

Warnings:

  • Documentation files were touched, but no docs/content.zh/ files: Update Chinese documentation or file Jira ticket.
  • This pull request references an unassigned Jira ticket. According to the code contribution guide, tickets need to be assigned before starting with the implementation work.

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.

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 avatar Dec 14 '21 22:12 flinkbot

@slinkydeveloper sorry for the delay and thanks for your feedback, I rebased it since it was already moved to assertj

snuyanzin avatar Apr 12 '22 14:04 snuyanzin

@JingsongLi sorry for the poke Since you are one of the committers dealing with datagen, could you please have a look here, once you have time?

snuyanzin avatar Apr 22 '22 11:04 snuyanzin

Partially it was reviewed by @slinkydeveloper @MartijnVisser sorry for the poke. Could you please tell if you happen to know who can help with further steps here?

snuyanzin avatar Jun 24 '22 11:06 snuyanzin

Rebased to resolve conflicts after merging https://github.com/apache/flink/pull/19827

snuyanzin avatar Aug 09 '22 13:08 snuyanzin

I'm sorry @snuyanzin, unfortunately I won't have time for this

slinkydeveloper avatar Sep 29 '22 12:09 slinkydeveloper

@alpinegizmo sorry for the poke could you please have a look once you have time?

snuyanzin avatar Feb 14 '23 20:02 snuyanzin

Thanks @RyanSkraba for having a look

snuyanzin avatar Jun 04 '23 21:06 snuyanzin