Skip to content

Add window function drill tests for array_concat_agg for empty over scenarios#17026

Merged
cryptoe merged 3 commits intoapache:masterfrom
Akshat-Jain:wf_add_tests_array_concat_agg
Sep 13, 2024
Merged

Add window function drill tests for array_concat_agg for empty over scenarios#17026
cryptoe merged 3 commits intoapache:masterfrom
Akshat-Jain:wf_add_tests_array_concat_agg

Conversation

@Akshat-Jain
Copy link
Copy Markdown
Contributor

Description

#16885 fixed issues with the following type of queries.

-- Query 1
select countryName, cityName, channel, array_concat_agg(ARRAY['N/A', countryName], 10000) over (order by countryName) as c
from wikipedia
where countryName in ('Austria', 'Republic of Korea') and (cityName in ('Horsching', 'Vienna', 'Seoul', 'Jeonju') or cityName is null)
group by countryName, cityName, channel

-- This query used to give InvalidNullByteException for MSQ engine.

-- Query 2
select
countryName, array_concat_agg(ARRAY[countryName], 10000) over () as c1
from wikipedia where countryName='Guatemala'
group by countryName

-- This used to give the following incorrect result for both sql-native and MSQ engines:
-- Guatemala	[""\t""]

This PR adds the above queries as drill tests so that the behavior is validated against both engines.


This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

Copy link
Copy Markdown
Contributor

@sreemanamala sreemanamala left a comment

Choose a reason for hiding this comment

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

LGTM.

@cryptoe cryptoe added this to the 31.0.0 milestone Sep 13, 2024
@cryptoe cryptoe removed this from the 31.0.0 milestone Sep 13, 2024
@cryptoe cryptoe merged commit fff3e81 into apache:master Sep 13, 2024
pranavbhole pushed a commit to pranavbhole/druid that referenced this pull request Sep 17, 2024
…cenarios (apache#17026)

* Add window function drill tests for array_concat_agg for empty over scenarios

* Cleanup sqlNativeIncompatible() as it's not needed now

* Address review comment
@adarshsanjeev adarshsanjeev added this to the 32.0.0 milestone Jan 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants