Akshat-Jain opened a new pull request, #16854:
URL: https://github.com/apache/druid/pull/16854
### Description
Currently, MSQ queries like the following failed with a NPE:
```sql
REPLACE INTO "test_1" OVERWRITE ALL
SELECT
"__time",
"countryName",
ROW_NUMBER() over (PARTITION BY countryName) as c1
FROM "wikipedia"
where countryName='Guatemala'
PARTITIONED BY DAY
```
The root cause was that the shuffle spec of the final window stage was being
hardcoded to MixShuffleSpec, hence it wasn't taking the required segment
granularity into account. This PR changes the logic to use the
`resultShuffleSpecFactory` for the last window stage.
Along with the above, we also need to add virtual columns like `__bucket` to
the frame writer in `WindowOperatorQueryFrameProcessor`. This PR makes this
change as well.
This PR also adds a test which fails with NPE without the changes of this PR.
<hr>
This PR has:
- [x] 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](https://github.com/apache/druid/blob/master/dev/license.md)
- [ ] 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](https://github.com/apache/druid/blob/master/dev/code-review/code-coverage.md)
is met.
- [ ] added integration tests.
- [ ] been tested in a test Druid cluster.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]