Skip to content

Report configured NULL ordering in JDBC metadata - #915

Merged
staticlibs merged 2 commits into
duckdb:mainfrom
hutiefang76:frank/newten-dd-null-order-20261010-01a11186
Oct 10, 2026
Merged

staticlibs merged 2 commits into
duckdb:mainfrom
hutiefang76:frank/newten-dd-null-order-20261010-01a11186

Conversation

@hutiefang76

Copy link
Copy Markdown
Contributor

The four JDBC NULL-order metadata flags currently return fixed, contradictory values (high=true and atStart=true) regardless of the connection setting. With the default NULLS_LAST, real queries put NULL last for both ASC and DESC, while metadata claims the opposite.

Read default_null_order from the connection when each flag is requested and report the corresponding JDBC ordering. The regression changes all four supported settings on one connection, observes real ASC/DESC query results, and derives the metadata expectations from those observations.

Validation: the new regression fails against the unchanged implementation. All current Java and test sources compile with JDK 17 targeting Java 8; all 33 TestMetadata tests pass against the existing DuckDB JNI build, including the new regression. Official clang-format 11.0.1 passes for both complete changed files. The native library was not rebuilt and the entire JDBC suite was not run.

AI assistance: implementation and first source review used DeepSeek; the contributor reviewed the full patch, applied review corrections, and executed the regression, metadata suite, and formatting checks.

Signed-off-by: hutiefang76 <137664623+hutiefang76@users.noreply.github.com>

@staticlibs staticlibs left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR! Looks good to me, just please rebase it on the latest main to resolve the merge conflict.

Signed-off-by: hutiefang76 <137664623+hutiefang76@users.noreply.github.com>
@staticlibs
staticlibs merged commit 9cf0858 into duckdb:main Oct 10, 2026
15 of 16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants