Skip to content

[BUG] DatabricksArray.getBaseTypeName() returns incorrect type #1738

Open

Description

@rileythomp

Describe the bug
DatabricksArray.getBaseTypeName() returns the type name of the full array, not the type name of its elements. DatabricksArray.getBaseType() always returns Types.OTHER.

The java.sql.Array docs say that both methods should describe the elements of the array.

To Reproduce

Properties props = new Properties();
props.setProperty("...", "...");
props.setProperty("EnableComplexDatatypeSupport", "1");

try (Connection con = DriverManager.getConnection("jdbc:databricks://<host>:443/", props);
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery("SELECT ARRAY(ARRAY(1, 2, 3))")) {
    rs.next();
    Array outer = rs.getArray(1);
    Array inner = (Array) ((Object[]) outer.getArray())[0];
    System.out.println(outer.getBaseTypeName() + " " + outer.getBaseType());
    System.out.println(inner.getBaseTypeName() + " " + inner.getBaseType());
}

Actual output:

ARRAY<ARRAY<INT>> 1111
ARRAY<INT> 1111

Expected behavior

ARRAY<INT> 2003
INT 4

getBaseTypeName() returns the element type name and getBaseType() returns the java.sql.Types code of the element type.

Screenshots
N/A

Client side logs
N/A.

Client Environment (please complete the following information):

  • OS: macOS
  • Java version: 25.0.2
  • Java vendor: openjdk
  • Driver Version: 3.4.1 (databricks-jdbc-thin)
  • BI Tool (if used): Metabase
  • BI Tool version (if applicable): master

Additional context
N/A

Activity

  1. added
    enhancementNew feature or request
    engineer-botMaintainer-only: triggers the autonomous engineer-bot (bug-fix author on issues; follow-up on PRs)
    on Oct 23, 2026
  2. peco-engineer-bot commented on Oct 23, 2026

    @peco-engineer-bot
    Contributor

    🤖 engineer-bot opened a fix PR: #1742

    Review before merge.

  3. rileythomp commented on Oct 26, 2026

    @rileythomp
    ContributorAuthor

    @vuanhphung Could I get a review/workflows approved on #1740? Or close it if you plan to use the bot PR

  4. added 2 commits that reference this issue on Oct 29, 2026
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

    engineer-botMaintainer-only: triggers the autonomous engineer-bot (bug-fix author on issues; follow-up on PRs)enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions