Skip to content

[BUG] getMetaData().getColumns() returns duplicate columns #1748

Closed

Description

@alitaker

Describe the bug
When calling getMetaData().getColumns() the resultset is exactly duplicate

To Reproduce
Clone a table or a schema with DEEP CLONE.
Run getMetaData().getColumns()
cycle with: while(rs.next())
Check that the resultset is duplicated

Expected behavior
Only one record per column in the resultset

Client Environment (please complete the following information):

  • OS: Red Hat Enterprise Linux release 8.10 (Ootpa)
  • Java version: Java 1.8.0_202
  • Java vendor: Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
  • Driver Version 3.4.4-jdk8

Activity

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

    @peco-engineer-bot
    Contributor

    🤖 engineer-bot could not complete an automated fix. See the workflow run for details.

  3. rahuls-db commented on Oct 28, 2026

    @rahuls-db
    Collaborator

    Hey @alitaker , We attempted to reproduce this using a table created with DEEP CLONE and consumed the complete getColumns() result using while (rs.next()), but did not observe duplicates.
    Can you share a standalone Java file that we can run directly to reproduce the issue, along with the exact JDBC driver artifact used? Please remove any credentials.

  4. alitaker commented on Oct 30, 2026

    @alitaker
    Author

    Unfortunately I'm not the owner of the database and cannot run DEEP CLONE copies.
    The columns are of this kind:

    {'col_name': '_0002', 'data_type': 'varchar(7)'}, 
    {'col_name': '_0003', 'data_type': 'varchar(1)'}, 
    {'col_name': '_0008', 'data_type': 'varchar(1)'}, 
    {'col_name': '_0009', 'data_type': 'varchar(1)'}, 
    {'col_name': '_0010', 'data_type': 'varchar(7)'}
    ]
    

    The driver version was:

    		<dependency>
    			<groupId>com.databricks</groupId>
    			<artifactId>databricks-jdbc</artifactId>
    			<version>2.6.40-patch-1</version>
    		</dependency>
    

    Then I compiled the latest jdk-8 branch (3.4.4) from the repo, but the result didn't change.

  5. rahuls-db commented on Nov 2, 2026

    @rahuls-db
    Collaborator

    Unfortunately, this doesn’t help me reproduce the issue. I’ve already tried the jdk-8 branch, and it appears to work as expected. If you can share a standalone repro, or ask someone else to provide one, that would help me investigate further. Otherwise, I’ll need to close this as not reproducible.

  6. alitaker commented on Nov 2, 2026

    @alitaker
    Author

    @rahuls-db, thanx for putting all that effort in reproducing the issue.
    Unfortunately the server is on a private network on Azure and data cannot be exported for policy.
    You may close the issue. I used a workaround that filters duplicate column names for now.

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)

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions