Skip to content

Conversation

@staticlibs
Copy link
Collaborator

This change fixes the NPE when a timestamp is being requested from the DATE result column.

With it both rs.getTimestamp(idx) and rs.getObject(idx, LocalDateTime.class) should work.

Testing: new tests added to cover java.sql.Timestamp and java.time.LocalDateTime

Fixes: #537

This change fixes the NPE when a timestamp is being requested from the
`DATE` result column.

With it both `rs.getTimestamp(idx)` and `rs.getObject(idx,
LocalDateTime.class)` should work.

Testing: new tests added to cover `java.sql.Timestamp` and
`java.time.LocalDateTime`

Fixes: duckdb#537
@staticlibs staticlibs merged commit 283bedc into duckdb:main Jan 23, 2026
12 checks passed
@staticlibs staticlibs deleted the timestamp_from_date branch January 23, 2026 15:34
staticlibs added a commit to staticlibs/duckdb-java that referenced this pull request Jan 23, 2026
This is a backport of the PR duckdb#539 to `v1.5-variegata` stable branch.

This change fixes the NPE when a timestamp is being requested from the
`DATE` result column.

With it both `rs.getTimestamp(idx)` and `rs.getObject(idx,
LocalDateTime.class)` should work.

Testing: new tests added to cover `java.sql.Timestamp` and
`java.time.LocalDateTime`

Fixes: duckdb#537
staticlibs added a commit to staticlibs/duckdb-java that referenced this pull request Jan 23, 2026
This is a backport of the PR duckdb#539 to `v1.4-andium` stable branch.

This change fixes the NPE when a timestamp is being requested from the
`DATE` result column.

With it both `rs.getTimestamp(idx)` and `rs.getObject(idx,
LocalDateTime.class)` should work.

Testing: new tests added to cover `java.sql.Timestamp` and
`java.time.LocalDateTime`

Fixes: duckdb#537
staticlibs added a commit that referenced this pull request Jan 23, 2026
This is a backport of the PR #539 to `v1.5-variegata` stable branch.

This change fixes the NPE when a timestamp is being requested from the
`DATE` result column.

With it both `rs.getTimestamp(idx)` and `rs.getObject(idx,
LocalDateTime.class)` should work.

Testing: new tests added to cover `java.sql.Timestamp` and
`java.time.LocalDateTime`

Fixes: #537
staticlibs added a commit that referenced this pull request Jan 23, 2026
This is a backport of the PR #539 to `v1.4-andium` stable branch.

This change fixes the NPE when a timestamp is being requested from the
`DATE` result column.

With it both `rs.getTimestamp(idx)` and `rs.getObject(idx,
LocalDateTime.class)` should work.

Testing: new tests added to cover `java.sql.Timestamp` and
`java.time.LocalDateTime`

Fixes: #537
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.

ResultSet.getTimestamp() throws NullPointerException on DATE column

1 participant