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

Allow override distinctCount to segmentPartitionedDistinctCount #7664

Conversation

xiangfu0
Copy link
Contributor

@xiangfu0 xiangfu0 commented Oct 29, 2021

Description

Pinot added this SegmentPartitionedDistinctCount function (#5786) long back to allow users to pre-partition distinct key at segment level then speed up distinct count query latency.

This PR introduces the function override automatically once user also specified the column is segment partitioned in FieldConfig prop with: isSegmentPartitioned=true.

Upgrade Notes

Does this PR prevent a zero down-time upgrade? (Assume upgrade order: Controller, Broker, Server, Minion)

  • Yes (Please label as backward-incompat, and complete the section below on Release Notes)

Does this PR fix a zero-downtime upgrade introduced earlier?

  • Yes (Please label this as backward-incompat, and complete the section below on Release Notes)

Does this PR otherwise need attention when creating release notes? Things to consider:

  • New configuration options
  • Deprecation of configurations
  • Signature changes to public methods/interfaces
  • New plugins added or old plugins removed
  • Yes (Please label this PR as release-notes and complete the section on Release Notes)

Release Notes

Documentation

@xiangfu0 xiangfu0 force-pushed the override_distinct_count_function_for_table_column branch 3 times, most recently from 6cb2e35 to 490a4e0 Compare October 29, 2021 18:24
@codecov-commenter
Copy link

codecov-commenter commented Oct 29, 2021

Codecov Report

Merging #7664 (e25e7e3) into master (1b4241d) will decrease coverage by 56.97%.
The diff coverage is 31.25%.

Impacted file tree graph

@@              Coverage Diff              @@
##             master    #7664       +/-   ##
=============================================
- Coverage     71.55%   14.58%   -56.98%     
+ Complexity     4036       80     -3956     
=============================================
  Files          1578     1532       -46     
  Lines         80249    78452     -1797     
  Branches      11914    11730      -184     
=============================================
- Hits          57426    11441    -45985     
- Misses        18955    66172    +47217     
+ Partials       3868      839     -3029     
Flag Coverage Δ
integration1 ?
integration2 ?
unittests1 ?
unittests2 14.58% <31.25%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...org/apache/pinot/spi/config/table/FieldConfig.java 0.00% <ø> (-96.00%) ⬇️
...roker/requesthandler/BaseBrokerRequestHandler.java 21.77% <31.25%> (-49.42%) ⬇️
...c/main/java/org/apache/pinot/common/tier/Tier.java 0.00% <0.00%> (-100.00%) ⬇️
...ain/java/org/apache/pinot/core/data/table/Key.java 0.00% <0.00%> (-100.00%) ⬇️
.../java/org/apache/pinot/spi/utils/BooleanUtils.java 0.00% <0.00%> (-100.00%) ⬇️
.../java/org/apache/pinot/core/data/table/Record.java 0.00% <0.00%> (-100.00%) ⬇️
.../java/org/apache/pinot/core/util/GroupByUtils.java 0.00% <0.00%> (-100.00%) ⬇️
...ava/org/apache/pinot/spi/data/MetricFieldSpec.java 0.00% <0.00%> (-100.00%) ⬇️
...va/org/apache/pinot/spi/utils/BigDecimalUtils.java 0.00% <0.00%> (-100.00%) ⬇️
...java/org/apache/pinot/common/tier/TierFactory.java 0.00% <0.00%> (-100.00%) ⬇️
... and 1250 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b4241d...e25e7e3. Read the comment docs.

@xiangfu0 xiangfu0 force-pushed the override_distinct_count_function_for_table_column branch 3 times, most recently from a2edf4c to a780267 Compare October 29, 2021 23:39
@xiangfu0 xiangfu0 force-pushed the override_distinct_count_function_for_table_column branch 7 times, most recently from 22658d2 to f0cc2a7 Compare November 1, 2021 05:20
@xiangfu0 xiangfu0 force-pushed the override_distinct_count_function_for_table_column branch from f0cc2a7 to fb1363e Compare November 1, 2021 06:25
Copy link
Contributor

@Jackie-Jiang Jackie-Jiang left a comment

Choose a reason for hiding this comment

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

LGTM otherwise

@xiangfu0 xiangfu0 force-pushed the override_distinct_count_function_for_table_column branch from fb1363e to 9850489 Compare November 1, 2021 20:19
@xiangfu0 xiangfu0 force-pushed the override_distinct_count_function_for_table_column branch from 9850489 to e25e7e3 Compare November 1, 2021 20:55
@xiangfu0 xiangfu0 merged commit 0ec77b5 into apache:master Nov 1, 2021
@xiangfu0 xiangfu0 deleted the override_distinct_count_function_for_table_column branch November 1, 2021 21:58
kriti-sc pushed a commit to kriti-sc/incubator-pinot that referenced this pull request Dec 12, 2021
…he#7664)

* Allow override distinctCount to segmentPartitionedDistinctCount

* check both rt and offline table field configs

* Address comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants