Skip to content

Regression: DatabaseMetaData.getColumns returns IS_NULLABLE="true"/"false" instead of JDBC spec "YES"/"NO" #664

Closed

Description

@wdroste

Summary

In duckdb_jdbc 1.5.2.0, DatabaseMetaData.getColumns(...) returns values of "true" / "false" for the IS_NULLABLE column. The JDBC specification mandates "YES" / "NO" / "" (empty). 1.5.1.0 returned "YES" as expected; this is a regression.

This breaks consumers that parse IS_NULLABLE per spec — notably jOOQ's generic MetaImpl under SQLDialect.DEFAULT, whose getTables(...) then returns tables with an empty field list.

Reproduction

import java.sql.*;
import java.util.Properties;

public class Repro {
  public static void main(String[] a) throws Exception {
    var c = new org.duckdb.DuckDBDriver().connect("jdbc:duckdb:", new Properties());
    try (var s = c.createStatement()) {
      s.execute("CREATE TABLE \"t\" (\"id\" BIGINT, \"v\" VARCHAR)");
    }
    try (var rs = c.getMetaData().getColumns(null, null, "t", null)) {
      while (rs.next()) {
        System.out.println(rs.getString("COLUMN_NAME") + " -> IS_NULLABLE=" + rs.getString("IS_NULLABLE"));
      }
    }
  }
}

Observed

1.5.2.0

id -> IS_NULLABLE=true
v  -> IS_NULLABLE=true

1.5.1.0 (expected / spec-compliant)

id -> IS_NULLABLE=YES
v  -> IS_NULLABLE=YES

Spec reference

java.sql.DatabaseMetaData#getColumns, column 18 IS_NULLABLE:

String => ISO rules are used to determine the nullability for a column.

  • YES --- if the column can include NULLs
  • NO --- if the column cannot include NULLs
  • empty string --- if the nullability for the column is unknown

Boolean literals "true" / "false" are not valid per the spec.

Impact

  • Any JDBC consumer that does "YES".equals(isNullable) / "NO".equals(isNullable) will misinterpret column nullability.
  • jOOQ 3.21.x generic Meta with SQLDialect.DEFAULT returns tables with zero fields against DuckDB 1.5.2.0, whereas SQLDialect.DUCKDB (dialect-specific path) still works. This surfaces in downstream test suites that use DSL.using(conn, SQLDialect.DEFAULT).meta() for inspection.

Environment

  • duckdb_jdbc: 1.5.2.0 (regression) vs 1.5.1.0 (OK)
  • JDK: Zulu 11.0.29
  • OS: Linux x86_64

Activity

  1. changed the title [-]DatabaseMetaData.getColumns returns IS_NULLABLE="true"/"false" instead of JDBC spec "YES"/"NO" (regression in 1.5.2.0)[/-] [+]Regression: DatabaseMetaData.getColumns returns IS_NULLABLE="true"/"false" instead of JDBC spec "YES"/"NO"[/+] on Apr 18, 2026
  2. added 2 commits that reference this issue on Apr 19, 2026
    8aca107
    a289773
  3. added 2 commits that reference this issue on Apr 19, 2026
    8c4fea3
    083033b
  4. staticlibs commented on Apr 19, 2026

    @staticlibs
    Member

    Thanks for the report! This should be fixed in #665, the following 1.5 snapshot build with the fix can be used:

      <dependency>
        <groupId>org.duckdb</groupId>
        <artifactId>duckdb_jdbc</artifactId>
        <version>1.5.3.0-083033b8-SNAPSHOT</version>
      </dependency>
      <repository>
        <id>central-snapshots</id>
        <url>https://central.sonatype.com/repository/maven-snapshots/</url>
        <snapshots><enabled>true</enabled></snapshots>
      </repository>
  5. wdroste commented on Apr 21, 2026

    @wdroste
    Author

    I'll have answers for you tomorrow, I'm deploying it tonight.

  6. wdroste commented on Apr 25, 2026

    @wdroste
    Author

    Sorry I'm late on this it looks good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions