Skip to content

Add support for arrayConcatLong, arrayConcatFloat, arrayConcatDouble#9131

Merged
siddharthteotia merged 1 commit intoapache:masterfrom
jugomezv:jugomez/ArrayConcatFloatDoubleLong
Aug 9, 2022
Merged

Add support for arrayConcatLong, arrayConcatFloat, arrayConcatDouble#9131
siddharthteotia merged 1 commit intoapache:masterfrom
jugomezv:jugomez/ArrayConcatFloatDoubleLong

Conversation

@jugomezv
Copy link
Contributor

Added support for functions arrayConcatLong, arrayConcatFloat, arrayConcatDouble and
its related unitests. Need to add documentation after this merges.

@snleee snleee requested review from siddharthteotia and snleee July 29, 2022 00:54
@codecov-commenter
Copy link

codecov-commenter commented Jul 29, 2022

Codecov Report

Merging #9131 (34e9005) into master (5a6a626) will decrease coverage by 6.31%.
The diff coverage is 37.03%.

❗ Current head 34e9005 differs from pull request most recent head 002ea5d. Consider uploading reports for the commit 002ea5d to get more accurate results

@@             Coverage Diff              @@
##             master    #9131      +/-   ##
============================================
- Coverage     69.98%   63.66%   -6.32%     
- Complexity     4674     4961     +287     
============================================
  Files          1838     1790      -48     
  Lines         97349    95223    -2126     
  Branches      14672    14433     -239     
============================================
- Hits          68128    60623    -7505     
- Misses        24483    30236    +5753     
+ Partials       4738     4364     -374     
Flag Coverage Δ
integration1 ?
integration2 ?
unittests1 67.05% <37.03%> (+0.14%) ⬆️
unittests2 15.35% <0.00%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
.../pinot/core/data/manager/BaseTableDataManager.java 73.22% <0.00%> (-0.59%) ⬇️
.../pinot/segment/local/segment/creator/Fixtures.java 100.00% <ø> (ø)
...manager/realtime/LLRealtimeSegmentDataManager.java 53.39% <31.81%> (-17.55%) ⬇️
...e/pinot/common/function/scalar/ArrayFunctions.java 100.00% <100.00%> (ø)
...va/org/apache/pinot/core/routing/RoutingTable.java 0.00% <0.00%> (-100.00%) ⬇️
...va/org/apache/pinot/common/config/NettyConfig.java 0.00% <0.00%> (-100.00%) ⬇️
...a/org/apache/pinot/common/metrics/MinionMeter.java 0.00% <0.00%> (-100.00%) ⬇️
...g/apache/pinot/common/metrics/ControllerMeter.java 0.00% <0.00%> (-100.00%) ⬇️
.../apache/pinot/common/metrics/BrokerQueryPhase.java 0.00% <0.00%> (-100.00%) ⬇️
.../apache/pinot/common/metrics/MinionQueryPhase.java 0.00% <0.00%> (-100.00%) ⬇️
... and 414 more

Help us with your feedback. Take ten seconds to tell us how you rate us.

Copy link
Contributor

Choose a reason for hiding this comment

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

Please also consider adding some other query execution tests. Take a look at BaseMultiValueQueriesTest or OfflineClusterIntegrationTest to add such tests.

Example cases ...

Nest the function

SELECT arraylength(arrayConcatInt(mvIntCol1, mvIntCol2))
FROM FOO
SELECT arraySortInt(arrayConcatInt(mvIntCol1, mvIntCol2))
FROM FOO

Use the output of the expression in WHERE clause

SELECT arrayConcatInt(mvIntCol1, mvIntCol2) AS concatenated
FROM FOO
WHERE arrayLength(concatenated) >= 2

Use in GROUP BY

SELECT arrayConcatInt(mvIntCol1, mvIntCol2) AS concatenated, sum(intcol)
FROM FOO
WHERE arrayLength(concatenated) >= 2
GROUP BY concatenated

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sidd:

Sure this is a good idea, just to confirm: such tests do not exists for the currently supported functions like arrayConcatInt and arrayConcatString, right?

If that is the case I can look into adding these tests for the new functions being added in this PR, I can file a new issue to support those that were added earlier so we don't hold this on earlier tech debt.

Copy link
Contributor

@siddharthteotia siddharthteotia Jul 29, 2022

Choose a reason for hiding this comment

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

such tests do not exists for the currently supported functions like arrayConcatInt and arrayConcatString, right?

I think that is correct (most likely). But we will have to dig through since tests are spread across so many files unfortunately.

If that is the case I can look into adding these tests for the new functions being added in this PR

Yes, in the PR I suggest adding tests only for new functions. Separate PR can be filed to add more tests for existing functions.

…catDouble

Added support for functions arrayConcatLong, arrayConcatFloat, arrayConcatDouble and
its related unitests. Need to add documentation after this merges.
Added integration test for all the new functions introduced and also for arrayConcatInt
and arrayConcatString which did not exist before.
@jugomezv jugomezv force-pushed the jugomez/ArrayConcatFloatDoubleLong branch from 002ea5d to 3b1da47 Compare August 5, 2022 01:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants