apache / pinot

Apache Pinot - A realtime distributed OLAP datastore
https://pinot.apache.org/
Apache License 2.0
5.52k stars 1.29k forks source link

validate schemaName must not have double underscore #14511

Closed rohityadav1993 closed 1 day ago

rohityadav1993 commented 1 day ago

cleanup

This PR adds the validation for schemaName to not allow double underscores similar to table name validation.

We don't allow table names with double underscores __ and additionally don't allow tables with schema name different from table name. Schema name validations can help early catching of wrongly named schemas.

https://github.com/apache/pinot/blob/81f16f3056a9957311cc13d4f92ee1b2e7b1761e/pinot-spi/src/main/java/org/apache/pinot/spi/config/table/TableConfig.java#L144

https://github.com/apache/pinot/blob/81f16f3056a9957311cc13d4f92ee1b2e7b1761e/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/utils/TableConfigUtils.java#L260

codecov-commenter commented 1 day ago

Codecov Report

Attention: Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.

Project coverage is 63.83%. Comparing base (59551e4) to head (44efb13). Report is 1371 commits behind head on master.

Files with missing lines Patch % Lines
...ller/api/resources/PinotSchemaRestletResource.java 0.00% 1 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #14511 +/- ## ============================================ + Coverage 61.75% 63.83% +2.08% - Complexity 207 1568 +1361 ============================================ Files 2436 2672 +236 Lines 133233 146682 +13449 Branches 20636 22493 +1857 ============================================ + Hits 82274 93639 +11365 - Misses 44911 46116 +1205 - Partials 6048 6927 +879 ``` | [Flag](https://app.codecov.io/gh/apache/pinot/pull/14511/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | | |---|---|---| | [custom-integration1](https://app.codecov.io/gh/apache/pinot/pull/14511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `100.00% <ø> (+99.99%)` | :arrow_up: | | [integration](https://app.codecov.io/gh/apache/pinot/pull/14511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `100.00% <ø> (+99.99%)` | :arrow_up: | | [integration1](https://app.codecov.io/gh/apache/pinot/pull/14511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `100.00% <ø> (+99.99%)` | :arrow_up: | | [integration2](https://app.codecov.io/gh/apache/pinot/pull/14511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `0.00% <ø> (ø)` | | | [java-11](https://app.codecov.io/gh/apache/pinot/pull/14511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `63.82% <0.00%> (+2.11%)` | :arrow_up: | | [java-21](https://app.codecov.io/gh/apache/pinot/pull/14511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `63.73% <0.00%> (+2.10%)` | :arrow_up: | | [skip-bytebuffers-false](https://app.codecov.io/gh/apache/pinot/pull/14511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `63.83% <0.00%> (+2.08%)` | :arrow_up: | | [skip-bytebuffers-true](https://app.codecov.io/gh/apache/pinot/pull/14511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `63.71% <0.00%> (+35.98%)` | :arrow_up: | | [temurin](https://app.codecov.io/gh/apache/pinot/pull/14511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `63.83% <0.00%> (+2.08%)` | :arrow_up: | | [unittests](https://app.codecov.io/gh/apache/pinot/pull/14511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `63.83% <0.00%> (+2.08%)` | :arrow_up: | | [unittests1](https://app.codecov.io/gh/apache/pinot/pull/14511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `55.53% <ø> (+8.64%)` | :arrow_up: | | [unittests2](https://app.codecov.io/gh/apache/pinot/pull/14511/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `34.57% <0.00%> (+6.84%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


🚨 Try these New Features: