You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "Hariomlokhande-coder (via GitHub)" <gi...@apache.org> on 2026/09/30 05:27:06 UTC
[PR] Fix default nulls order for ClickHouse and Presto [shardingsphere]
Hariomlokhande-coder opened a new pull request, #40015:
URL: https://github.com/apache/shardingsphere/pull/40015
Fixes #40014.
Changes proposed in this pull request:
- `ClickHouseDatabaseMetaData` and `PrestoDatabaseMetaData` now return `NullsOrderType.LAST`. Both databases sort NULLs last by default in both directions (doc links in the issue).
- `LAST` resolves to itself, so explicit ORDER BY merging, `ShardingProjectionsTokenGenerator` and the generated ORDER BY for DISTINCT (#40002) all pick up the right value. The rewritten SQL doesn't change, since `OrderByToken` doesn't write a NULLS clause.
- Updates the two metadata tests and adds a Bug Fixes entry to `RELEASE-NOTES.md`.
- I also went through the other dialects. MySQL (and MariaDB/Doris through it), H2, SQL Server, Firebird and Hive stay `LOW`; PostgreSQL, Oracle and openGauss stay `HIGH`. That matches their docs.
- Verified with `./mvnw install -Pcheck` on the ClickHouse and Presto connector and parser modules. I also ran shard results `[5, NULL]` + `[10]` through `ShardingDQLResultMerger` for both dialects: ORDER BY ASC gives `[5, null, 10]` before and `[5, 10, null]` after. DESC and DISTINCT are correct after the change, with and without #40002.
---
Before committing this PR, I'm sure that I have checked the following options:
- [x] My code follows the [code of conduct](https://shardingsphere.apache.org/community/en/involved/conduct/code/) of this project.
- [x] I have self-reviewed the commit code.
- [ ] I have (or in comment I request) added corresponding labels for the pull request.
- [ ] I have passed maven check locally : `./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e`. Ran the module-scoped checks listed above instead.
- [ ] I have made corresponding changes to the documentation. No documentation covers the default nulls order.
- [x] I have added corresponding unit tests for my changes.
- [x] I have updated the Release Notes of the current development version. For more details, see [Update Release Note](https://shardingsphere.apache.org/community/en/involved/contribute/contributor/)
- [ ] I have disclosed the tool and affected files or scope for any material AI assistance, as required by the [AI-assisted contribution policy].
[AI-assisted contribution policy]: https://github.com/apache/shardingsphere/blob/master/AI_POLICY.md
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix default nulls order for ClickHouse and Presto [shardingsphere]
Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu merged PR #40015:
URL: https://github.com/apache/shardingsphere/pull/40015
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix default nulls order for ClickHouse and Presto [shardingsphere]
Posted by "Hariomlokhande-coder (via GitHub)" <gi...@apache.org>.
Hariomlokhande-coder commented on PR #40015:
URL: https://github.com/apache/shardingsphere/pull/40015#issuecomment-5907245450
The CI job failed before the build started: the Maven wrapper couldn't download Maven (`wget: Failed to fetch .../apache-maven-3.9.14-bin.zip`), so it looks like a network hiccup on the runner, not something in the change. Required - Check, CI - MCP and E2E - Agent passed. Could someone re-run the failed job when you get a chance? I can't re-run it from a fork.
--
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: notifications-unsubscribe@shardingsphere.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org