Skip to content
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-13611] [table-planner-blink] Introduce statistic generator utility to generate table & column statistics #9392

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

godfreyhe
Copy link
Contributor

What is the purpose of the change

Introduce statistic generator utility to generate table & column statistics

Brief change log

  • fix "some AggregateCall attributes is lost in RelTimeIndicatorConverter"
  • Supports APPROX_COUNT_DISTINCT
  • Add StatisticGenerator for analyzing table stats and column stats
  • Add TableStatsConverter for converting TableStats to CatalogTableStatistics and CatalogColumnStatistics

Verifying this change

This change added tests and can be verified as follows:

  • Added XXH64Test to verify XXH64
  • Added HyperLogLogPlusPlusTest to verify HyperLogLogPlusPlus
  • Added plan test to verify APPROX_COUNT_DISTINCT
  • Added StatisticGeneratorTest to verify StatisticGenerator
  • Added TableStatsConverterTest to verify TableStatsConverter

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

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

Documentation

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

@flinkbot
Copy link
Collaborator

flinkbot commented Aug 8, 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 873811b (Thu Oct 24 18:04:17 UTC 2019)

Warnings:

  • No documentation files were touched! Remember to keep the Flink docs up to date!
  • 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
Copy link
Collaborator

flinkbot commented Aug 8, 2019

CI report:

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

@fpompermaier
Copy link
Contributor

I also tried to write something like that and the problem I had was that the computatio of column stats, if computed independently, is not so efficient (all the values of a column is read by every stat function while you could just read the values once and compute all the statistics in one big function).
For more details about our test implementation look at https://github.com/okkam-it/flink-descriptive-stats/blob/master/src/main/java/jar/ProfileJob.java

@godfreyhe
Copy link
Contributor Author

thanks for the feedback @fpompermaier . currently, this pr only supports simple statistics which are defined in TableStats. For the advanced features like top k , histograms, we can consolidate them together.

@godfreyhe godfreyhe force-pushed the FLINK-13611 branch 2 times, most recently from 07d04ce to 96d8b4c Compare August 9, 2019 06:08
@leonardBang
Copy link
Contributor

the PR is helpful for me,thanks @godfreyhe

@leonardBang
Copy link
Contributor

@godfreyhe
I'm ready to review this PR, Could you fix the conflicts before review?

@godfreyhe
Copy link
Contributor Author

@leonardBang I had rebased, thanks for the review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants