druid
druid copied to clipboard
Bug fix for array type selector causing array aggregation over window frame fail
Description
This commit fixes the windowed aggregation involving array type selector.
example query (earlier used to fail with a defensive exception):
select countryName, cityName, channel, array_concat_agg(ARRAY['N/A', channel], 10000) over (partition by cityName 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
Key changed/added classes in this PR
DefaultColumnSelectorFactoryMakerExpressionSelectors
This PR has:
- [x] been self-reviewed.
- [ ] using the concurrency checklist (Remove this item if the PR doesn't have any relation to concurrency.)
- [ ] 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.
- [x] 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.