Add support for arrayConcatLong, arrayConcatFloat, arrayConcatDouble#9131
Conversation
Codecov Report
@@ 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
Flags with carried forward coverage won't be shown. Click here to find out more.
Help us with your feedback. Take ten seconds to tell us how you rate us. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
002ea5d to
3b1da47
Compare
Added support for functions arrayConcatLong, arrayConcatFloat, arrayConcatDouble and
its related unitests. Need to add documentation after this merges.