You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/05/25 06:36:28 UTC
[GitHub] [incubator-pinot] Jackie-Jiang opened a new pull request #6968: Support null value fields in generic row ser/de
Jackie-Jiang opened a new pull request #6968:
URL: https://github.com/apache/incubator-pinot/pull/6968
- Replace `GenericRowSerDeUtils` with `GenericRowSerializer` and `GenericRowDeserailizer` for the following enhancement:
- Support null value fields ser/de to preserve the null fields information
- Cache the encoded string bytes to avoid encoding strings twice
- Support partial deserialize values to only deserialize the needed fields when sorting the rows
- Add `SortOrderComparator` to compare the partial deserialized values
- Modify `ConcatCollector` to use the new classes
- Add `GenericRowSerDeTest` to test the new classes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] yupeng9 commented on pull request #6968: Support null value fields in generic row ser/de
Posted by GitBox <gi...@apache.org>.
yupeng9 commented on pull request #6968:
URL: https://github.com/apache/incubator-pinot/pull/6968#issuecomment-848040904
For null value support, does this still require enabling null via config?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] Jackie-Jiang merged pull request #6968: Support null value fields in generic row ser/de
Posted by GitBox <gi...@apache.org>.
Jackie-Jiang merged pull request #6968:
URL: https://github.com/apache/incubator-pinot/pull/6968
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] codecov-commenter commented on pull request #6968: Support null value fields in generic row ser/de
Posted by GitBox <gi...@apache.org>.
codecov-commenter commented on pull request #6968:
URL: https://github.com/apache/incubator-pinot/pull/6968#issuecomment-847623166
# [Codecov](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#6968](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (9977f8e) into [master](https://codecov.io/gh/apache/incubator-pinot/commit/1efde00c91655a361dc1c5fb2868a2693dbe3a52?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (1efde00) will **decrease** coverage by `7.73%`.
> The diff coverage is `90.45%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-pinot/pull/6968/graphs/tree.svg?width=650&height=150&src=pr&token=4ibza2ugkz&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #6968 +/- ##
============================================
- Coverage 73.26% 65.53% -7.74%
Complexity 12 12
============================================
Files 1435 1437 +2
Lines 71169 71260 +91
Branches 10310 10325 +15
============================================
- Hits 52144 46702 -5442
- Misses 15528 21179 +5651
+ Partials 3497 3379 -118
```
| Flag | Coverage Δ | |
|---|---|---|
| integration | `?` | |
| unittests | `65.53% <90.45%> (+0.22%)` | :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=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ment/processing/collector/SortOrderComparator.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9zZWdtZW50L3Byb2Nlc3NpbmcvY29sbGVjdG9yL1NvcnRPcmRlckNvbXBhcmF0b3IuamF2YQ==) | `58.33% <58.33%> (ø)` | |
| [.../segment/processing/collector/ConcatCollector.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9zZWdtZW50L3Byb2Nlc3NpbmcvY29sbGVjdG9yL0NvbmNhdENvbGxlY3Rvci5qYXZh) | `88.88% <88.88%> (-0.86%)` | :arrow_down: |
| [...segment/processing/serde/GenericRowSerializer.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9zZWdtZW50L3Byb2Nlc3Npbmcvc2VyZGUvR2VuZXJpY1Jvd1NlcmlhbGl6ZXIuamF2YQ==) | `92.85% <92.85%> (ø)` | |
| [...gment/processing/serde/GenericRowDeserializer.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9zZWdtZW50L3Byb2Nlc3Npbmcvc2VyZGUvR2VuZXJpY1Jvd0Rlc2VyaWFsaXplci5qYXZh) | `94.91% <94.91%> (ø)` | |
| [.../org/apache/pinot/spi/data/readers/GenericRow.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvZGF0YS9yZWFkZXJzL0dlbmVyaWNSb3cuamF2YQ==) | `50.00% <100.00%> (+5.35%)` | :arrow_up: |
| [...a/org/apache/pinot/minion/metrics/MinionMeter.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtbWluaW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9taW5pb24vbWV0cmljcy9NaW5pb25NZXRlci5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../apache/pinot/common/metrics/BrokerQueryPhase.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vbWV0cmljcy9Ccm9rZXJRdWVyeVBoYXNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../apache/pinot/minion/metrics/MinionQueryPhase.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtbWluaW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9taW5pb24vbWV0cmljcy9NaW5pb25RdWVyeVBoYXNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...pache/pinot/common/utils/grpc/GrpcQueryClient.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vdXRpbHMvZ3JwYy9HcnBjUXVlcnlDbGllbnQuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...pinot/minion/exception/TaskCancelledException.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtbWluaW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9taW5pb24vZXhjZXB0aW9uL1Rhc2tDYW5jZWxsZWRFeGNlcHRpb24uamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [340 more](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [1efde00...9977f8e](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] codecov-commenter edited a comment on pull request #6968: Support null value fields in generic row ser/de
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #6968:
URL: https://github.com/apache/incubator-pinot/pull/6968#issuecomment-847623166
# [Codecov](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#6968](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (946608a) into [master](https://codecov.io/gh/apache/incubator-pinot/commit/0185482d9da2ac299b4b15bcd2998165ccbbdf71?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0185482) will **increase** coverage by `0.13%`.
> The diff coverage is `90.65%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-pinot/pull/6968/graphs/tree.svg?width=650&height=150&src=pr&token=4ibza2ugkz&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #6968 +/- ##
============================================
+ Coverage 73.23% 73.37% +0.13%
Complexity 12 12
============================================
Files 1439 1441 +2
Lines 71333 71430 +97
Branches 10334 10351 +17
============================================
+ Hits 52243 52413 +170
+ Misses 15578 15500 -78
- Partials 3512 3517 +5
```
| Flag | Coverage Δ | |
|---|---|---|
| integration | `42.05% <67.47%> (+0.20%)` | :arrow_up: |
| unittests | `65.53% <90.65%> (+0.18%)` | :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=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ment/processing/collector/SortOrderComparator.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9zZWdtZW50L3Byb2Nlc3NpbmcvY29sbGVjdG9yL1NvcnRPcmRlckNvbXBhcmF0b3IuamF2YQ==) | `58.33% <58.33%> (ø)` | |
| [.../segment/processing/collector/ConcatCollector.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9zZWdtZW50L3Byb2Nlc3NpbmcvY29sbGVjdG9yL0NvbmNhdENvbGxlY3Rvci5qYXZh) | `88.88% <88.88%> (-0.86%)` | :arrow_down: |
| [...segment/processing/serde/GenericRowSerializer.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9zZWdtZW50L3Byb2Nlc3Npbmcvc2VyZGUvR2VuZXJpY1Jvd1NlcmlhbGl6ZXIuamF2YQ==) | `93.22% <93.22%> (ø)` | |
| [...gment/processing/serde/GenericRowDeserializer.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9zZWdtZW50L3Byb2Nlc3Npbmcvc2VyZGUvR2VuZXJpY1Jvd0Rlc2VyaWFsaXplci5qYXZh) | `94.91% <94.91%> (ø)` | |
| [.../org/apache/pinot/spi/data/readers/GenericRow.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvZGF0YS9yZWFkZXJzL0dlbmVyaWNSb3cuamF2YQ==) | `50.00% <100.00%> (+5.35%)` | :arrow_up: |
| [...readers/constant/ConstantMVForwardIndexReader.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc2VnbWVudC1sb2NhbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3Qvc2VnbWVudC9sb2NhbC9zZWdtZW50L2luZGV4L3JlYWRlcnMvY29uc3RhbnQvQ29uc3RhbnRNVkZvcndhcmRJbmRleFJlYWRlci5qYXZh) | `14.28% <0.00%> (-28.58%)` | :arrow_down: |
| [...nction/DistinctCountBitmapAggregationFunction.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9xdWVyeS9hZ2dyZWdhdGlvbi9mdW5jdGlvbi9EaXN0aW5jdENvdW50Qml0bWFwQWdncmVnYXRpb25GdW5jdGlvbi5qYXZh) | `42.26% <0.00%> (-10.83%)` | :arrow_down: |
| [...nt/index/readers/ConstantValueBytesDictionary.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc2VnbWVudC1sb2NhbC9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3Qvc2VnbWVudC9sb2NhbC9zZWdtZW50L2luZGV4L3JlYWRlcnMvQ29uc3RhbnRWYWx1ZUJ5dGVzRGljdGlvbmFyeS5qYXZh) | `23.80% <0.00%> (-4.77%)` | :arrow_down: |
| [...operator/filter/RangeIndexBasedFilterOperator.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9vcGVyYXRvci9maWx0ZXIvUmFuZ2VJbmRleEJhc2VkRmlsdGVyT3BlcmF0b3IuamF2YQ==) | `40.42% <0.00%> (-4.26%)` | :arrow_down: |
| [.../org/apache/pinot/core/startree/StarTreeUtils.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9zdGFydHJlZS9TdGFyVHJlZVV0aWxzLmphdmE=) | `73.58% <0.00%> (-3.78%)` | :arrow_down: |
| ... and [29 more](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0185482...946608a](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] npawar commented on a change in pull request #6968: Support null value fields in generic row ser/de
Posted by GitBox <gi...@apache.org>.
npawar commented on a change in pull request #6968:
URL: https://github.com/apache/incubator-pinot/pull/6968#discussion_r639170675
##########
File path: pinot-core/src/main/java/org/apache/pinot/core/segment/processing/serde/GenericRowSerializer.java
##########
@@ -0,0 +1,228 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.core.segment.processing.serde;
+
+import java.nio.ByteBuffer;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import org.apache.pinot.segment.spi.memory.PinotDataBuffer;
+import org.apache.pinot.spi.data.FieldSpec;
+import org.apache.pinot.spi.data.FieldSpec.DataType;
+import org.apache.pinot.spi.data.readers.GenericRow;
+import org.apache.pinot.spi.utils.StringUtils;
+
+
+/**
+ * Utility class to serialize the {@link GenericRow}.
+ * The bytes are stored in NATIVE order. The data should be deserialized by the {@link GenericRowDeserializer} on the
+ * same host to ensure that both of them are using the same byte order.
+ */
+public class GenericRowSerializer {
+ private final int _numFields;
+ private final String[] _fieldNames;
+ private final boolean[] _isSingleValueFields;
+ private final DataType[] _storedTypes;
+ // Cache the encoded string bytes
+ private final Object[] _stringBytes;
+ // Store index for null value fields
+ private final Map<String, Integer> _fieldIndexMap;
+
+ public GenericRowSerializer(List<FieldSpec> fieldSpecs, boolean includeNullValueFields) {
+ _numFields = fieldSpecs.size();
+ _fieldNames = new String[_numFields];
+ _isSingleValueFields = new boolean[_numFields];
+ _storedTypes = new DataType[_numFields];
+ _stringBytes = new Object[_numFields];
+ for (int i = 0; i < _numFields; i++) {
+ FieldSpec fieldSpec = fieldSpecs.get(i);
+ _fieldNames[i] = fieldSpec.getName();
+ _isSingleValueFields[i] = fieldSpec.isSingleValueField();
+ _storedTypes[i] = fieldSpec.getDataType().getStoredType();
+ }
+ if (includeNullValueFields) {
+ _fieldIndexMap = new HashMap<>();
+ for (int i = 0; i < _numFields; i++) {
+ _fieldIndexMap.put(_fieldNames[i], i);
+ }
+ } else {
+ _fieldIndexMap = null;
+ }
+ }
+
+ /**
+ * Serializes the given {@link GenericRow}.
+ */
+ public byte[] serialize(GenericRow row) {
+ int numBytes = 0;
+
+ // First pass: calculate the number of bytes required
+ for (int i = 0; i < _numFields; i++) {
+ Object value = row.getValue(_fieldNames[i]);
+
+ if (_isSingleValueFields[i]) {
+ switch (_storedTypes[i]) {
+ case INT:
+ numBytes += Integer.BYTES;
+ break;
+ case LONG:
+ numBytes += Long.BYTES;
+ break;
+ case FLOAT:
+ numBytes += Float.BYTES;
+ break;
+ case DOUBLE:
+ numBytes += Double.BYTES;
+ break;
+ case STRING:
+ byte[] stringBytes = StringUtils.encodeUtf8((String) value);
+ numBytes += Integer.BYTES + stringBytes.length;
+ _stringBytes[i] = stringBytes;
+ break;
+ case BYTES:
+ numBytes += Integer.BYTES + ((byte[]) value).length;
+ break;
+ default:
+ throw new IllegalStateException("Unsupported SV stored type: " + _storedTypes[i]);
+ }
+ } else {
+ Object[] multiValue = (Object[]) value;
+ int numValues = multiValue.length;
+ numBytes += Integer.BYTES; // Number of values
+
+ switch (_storedTypes[i]) {
+ case INT:
+ numBytes += Integer.BYTES * numValues;
+ break;
+ case LONG:
+ numBytes += Long.BYTES * numValues;
+ break;
+ case FLOAT:
+ numBytes += Float.BYTES * numValues;
+ break;
+ case DOUBLE:
+ numBytes += Double.BYTES * numValues;
+ break;
+ case STRING:
+ numBytes += Integer.BYTES * numValues;
+ byte[][] stringBytesArray = new byte[numValues][];
+ for (int j = 0; j < numValues; j++) {
+ byte[] stringBytes = StringUtils.encodeUtf8((String) multiValue[j]);
+ numBytes += stringBytes.length;
+ stringBytesArray[j] = stringBytes;
+ }
+ _stringBytes[i] = stringBytesArray;
+ break;
+ default:
+ throw new IllegalStateException("Unsupported MV stored type: " + _storedTypes[i]);
+ }
+ }
+ }
+
+ // Serialize null value fields if enabled
+ if (_fieldIndexMap != null) {
+ Set<String> nullValueFields = row.getNullValueFields();
+ numBytes += Integer.BYTES * (1 + nullValueFields.size());
+ }
+
+ byte[] serializedBytes = new byte[numBytes];
+ ByteBuffer byteBuffer = ByteBuffer.wrap(serializedBytes).order(PinotDataBuffer.NATIVE_ORDER);
+
+ // Second pass: serialize the values
+ for (int i = 0; i < _numFields; i++) {
+ Object value = row.getValue(_fieldNames[i]);
+
+ if (_isSingleValueFields[i]) {
+ switch (_storedTypes[i]) {
+ case INT:
+ byteBuffer.putInt((int) value);
+ break;
+ case LONG:
+ byteBuffer.putLong((long) value);
+ break;
+ case FLOAT:
+ byteBuffer.putFloat((float) value);
+ break;
+ case DOUBLE:
+ byteBuffer.putDouble((double) value);
+ break;
+ case STRING:
+ byte[] stringBytes = (byte[]) _stringBytes[i];
+ byteBuffer.putInt(stringBytes.length);
+ byteBuffer.put(stringBytes);
+ break;
+ case BYTES:
+ byte[] bytes = (byte[]) value;
+ byteBuffer.putInt(bytes.length);
+ byteBuffer.put(bytes);
+ break;
+ default:
+ throw new IllegalStateException();
Review comment:
nit: even though this default block will never be reached, add message to the exception? for code readability and also to catch any mistakes made by future development
##########
File path: pinot-core/src/main/java/org/apache/pinot/core/segment/processing/collector/SortOrderComparator.java
##########
@@ -0,0 +1,72 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.pinot.core.segment.processing.collector;
+
+import java.util.Comparator;
+import org.apache.pinot.spi.data.FieldSpec.DataType;
+import org.apache.pinot.spi.utils.ByteArray;
+
+
+/**
+ * Comparator for values of the sort columns.
+ */
+public class SortOrderComparator implements Comparator<Object[]> {
+ private final int _numSortColumns;
+ private final DataType[] _sortColumnStoredTypes;
+
+ public SortOrderComparator(int numSortColumns, DataType[] sortColumnStoredTypes) {
+ _numSortColumns = numSortColumns;
+ _sortColumnStoredTypes = sortColumnStoredTypes;
+ }
+
+ @Override
+ public int compare(Object[] o1, Object[] o2) {
+ for (int i = 0; i < _numSortColumns; i++) {
+ Object value1 = o1[i];
+ Object value2 = o2[i];
+ int result;
+ switch (_sortColumnStoredTypes[i]) {
+ case INT:
+ result = Integer.compare((int) value1, (int) value2);
+ break;
+ case LONG:
+ result = Long.compare((long) value1, (long) value2);
+ break;
+ case FLOAT:
+ result = Float.compare((float) value1, (float) value2);
+ break;
+ case DOUBLE:
+ result = Double.compare((double) value1, (double) value2);
+ break;
+ case STRING:
+ result = ((String) value1).compareTo((String) value2);
+ break;
+ case BYTES:
+ result = ByteArray.compare((byte[]) value1, (byte[]) value2);
+ break;
+ default:
+ throw new IllegalStateException();
Review comment:
exception msg here? would be useful if this is used in places other than the ConcatCollector too
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] Jackie-Jiang commented on pull request #6968: Support null value fields in generic row ser/de
Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on pull request #6968:
URL: https://github.com/apache/incubator-pinot/pull/6968#issuecomment-848178745
> For null value support, does this still require enabling null via config?
Yes. The `nullValueFields` are set in `GenericRow` only when the null value is enabled in table config. The change in this PR only make ser/de preserve the `nullValueFields` info.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] Jackie-Jiang commented on pull request #6968: Support null value fields in generic row ser/de
Posted by GitBox <gi...@apache.org>.
Jackie-Jiang commented on pull request #6968:
URL: https://github.com/apache/incubator-pinot/pull/6968#issuecomment-848215710
> > > For null value support, does this still require enabling null via config?
> >
> >
> > Yes. The `nullValueFields` are set in `GenericRow` only when the null value is enabled in table config. The change in this PR only make ser/de preserve the `nullValueFields` info.
>
> If the ser/de preserve the null info, then do we still need the enabling config? Or shall we just always enable null handling?
Yes, you still need to enable the null handling in the table config
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] yupeng9 commented on pull request #6968: Support null value fields in generic row ser/de
Posted by GitBox <gi...@apache.org>.
yupeng9 commented on pull request #6968:
URL: https://github.com/apache/incubator-pinot/pull/6968#issuecomment-848189794
> > For null value support, does this still require enabling null via config?
>
> Yes. The `nullValueFields` are set in `GenericRow` only when the null value is enabled in table config. The change in this PR only make ser/de preserve the `nullValueFields` info.
If the ser/de preserve the null info, then do we still need the enabling config? Or shall we just always enable null handling?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org
[GitHub] [incubator-pinot] codecov-commenter edited a comment on pull request #6968: Support null value fields in generic row ser/de
Posted by GitBox <gi...@apache.org>.
codecov-commenter edited a comment on pull request #6968:
URL: https://github.com/apache/incubator-pinot/pull/6968#issuecomment-847623166
# [Codecov](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#6968](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (946608a) into [master](https://codecov.io/gh/apache/incubator-pinot/commit/0185482d9da2ac299b4b15bcd2998165ccbbdf71?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (0185482) will **decrease** coverage by `7.70%`.
> The diff coverage is `90.65%`.
[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-pinot/pull/6968/graphs/tree.svg?width=650&height=150&src=pr&token=4ibza2ugkz&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
```diff
@@ Coverage Diff @@
## master #6968 +/- ##
============================================
- Coverage 73.23% 65.53% -7.71%
Complexity 12 12
============================================
Files 1439 1441 +2
Lines 71333 71430 +97
Branches 10334 10351 +17
============================================
- Hits 52243 46813 -5430
- Misses 15578 21225 +5647
+ Partials 3512 3392 -120
```
| Flag | Coverage Δ | |
|---|---|---|
| integration | `?` | |
| unittests | `65.53% <90.65%> (+0.18%)` | :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=The+Apache+Software+Foundation#carryforward-flags-in-the-pull-request-comment) to find out more.
| [Impacted Files](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...ment/processing/collector/SortOrderComparator.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9zZWdtZW50L3Byb2Nlc3NpbmcvY29sbGVjdG9yL1NvcnRPcmRlckNvbXBhcmF0b3IuamF2YQ==) | `58.33% <58.33%> (ø)` | |
| [.../segment/processing/collector/ConcatCollector.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9zZWdtZW50L3Byb2Nlc3NpbmcvY29sbGVjdG9yL0NvbmNhdENvbGxlY3Rvci5qYXZh) | `88.88% <88.88%> (-0.86%)` | :arrow_down: |
| [...segment/processing/serde/GenericRowSerializer.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9zZWdtZW50L3Byb2Nlc3Npbmcvc2VyZGUvR2VuZXJpY1Jvd1NlcmlhbGl6ZXIuamF2YQ==) | `93.22% <93.22%> (ø)` | |
| [...gment/processing/serde/GenericRowDeserializer.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9zZWdtZW50L3Byb2Nlc3Npbmcvc2VyZGUvR2VuZXJpY1Jvd0Rlc2VyaWFsaXplci5qYXZh) | `94.91% <94.91%> (ø)` | |
| [.../org/apache/pinot/spi/data/readers/GenericRow.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3Qtc3BpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9zcGkvZGF0YS9yZWFkZXJzL0dlbmVyaWNSb3cuamF2YQ==) | `50.00% <100.00%> (+5.35%)` | :arrow_up: |
| [...a/org/apache/pinot/minion/metrics/MinionMeter.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtbWluaW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9taW5pb24vbWV0cmljcy9NaW5pb25NZXRlci5qYXZh) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../apache/pinot/common/metrics/BrokerQueryPhase.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vbWV0cmljcy9Ccm9rZXJRdWVyeVBoYXNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [.../apache/pinot/minion/metrics/MinionQueryPhase.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtbWluaW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9taW5pb24vbWV0cmljcy9NaW5pb25RdWVyeVBoYXNlLmphdmE=) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...pache/pinot/common/utils/grpc/GrpcQueryClient.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtY29tbW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9jb21tb24vdXRpbHMvZ3JwYy9HcnBjUXVlcnlDbGllbnQuamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| [...pinot/minion/exception/TaskCancelledException.java](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-cGlub3QtbWluaW9uL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9waW5vdC9taW5pb24vZXhjZXB0aW9uL1Rhc2tDYW5jZWxsZWRFeGNlcHRpb24uamF2YQ==) | `0.00% <0.00%> (-100.00%)` | :arrow_down: |
| ... and [343 more](https://codecov.io/gh/apache/incubator-pinot/pull/6968/diff?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [0185482...946608a](https://codecov.io/gh/apache/incubator-pinot/pull/6968?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org