Skip to content

SNOW-3725168: Handle VECTOR type in isCaseSensitive and getColumnClassName#2685

Open
AndreiRudkouski wants to merge 1 commit into
snowflakedb:masterfrom
AndreiRudkouski:SNOW-3725168
Open

SNOW-3725168: Handle VECTOR type in isCaseSensitive and getColumnClassName#2685
AndreiRudkouski wants to merge 1 commit into
snowflakedb:masterfrom
AndreiRudkouski:SNOW-3725168

Conversation

@AndreiRudkouski

@AndreiRudkouski AndreiRudkouski commented Jul 1, 2026

Copy link
Copy Markdown

Overview

SNOW-3725168

Pre-review self checklist

  • PR branch is updated with all the changes from master branch
  • The code is correctly formatted (run mvn -P check-style validate)
  • New public API is not unnecessary exposed (run mvn verify and inspect target/japicmp/japicmp.html)
  • The pull request name is prefixed with SNOW-XXXX:
  • Code is in compliance with internal logging requirements

External contributors - please answer these questions before submitting a pull request. Thanks!

  1. What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.

    Issue: SNOW-3725168: [Bug] Vector type (50003) causes SQLFeatureNotSupportedException in ResultSetMetaData #2684

  2. Fill out the following pre-review checklist:

    • I am adding a new automated test(s) to verify correctness of my new code
    • I am adding new logging messages
    • I am modifying authorization mechanisms
    • I am adding new credentials
    • I am modifying OCSP code
    • I am adding a new dependency or upgrading an existing one
    • I am adding new public/protected component not marked with @SnowflakeJdbcInternalApi (note that public/protected methods/fields in classes marked with this annotation are already internal)
  3. Please describe how your code solves the related issue.

    This PR resolves the issue where the Snowflake VECTOR data type was not correctly mapped to a standard JDBC type, causing external tools and ORMs to fail when retrieving vector columns.

    Solution:
    The fix correctly maps SnowflakeType.EXTRA_TYPES_VECTOR to java.sql.Types.VARCHAR.
    Since the driver internally already extracts VECTOR data as a JSON string via getString(columnIndex), mapping it to VARCHAR ensures maximum compatibility with standard JDBC clients without breaking internal driver logic.

@AndreiRudkouski AndreiRudkouski requested a review from a team as a code owner July 1, 2026 20:07
Copilot AI review requested due to automatic review settings July 1, 2026 20:07
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@AndreiRudkouski AndreiRudkouski changed the title SNOW-3725168: Handle VECTOR type in isCaseSensitive and getColumnCla… SNOW-3725168: Handle VECTOR type in isCaseSensitive and getColumnClassName Jul 1, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds proper JDBC metadata handling for Snowflake VECTOR columns so metadata queries don’t misreport capabilities or throw for unsupported type codes.

Changes:

  • Treat VECTOR as VARCHAR for ResultSetMetaData.isCaseSensitive(...) to align with how structured/string-represented types are handled.
  • Treat VECTOR as VARCHAR for ResultSetMetaData.getColumnClassName(...) to avoid SQLFeatureNotSupportedException from SnowflakeTypeUtil.javaTypeToClassName(...).
  • Add/extend integration tests to assert VECTOR column type, class name, and case-sensitivity behavior.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/test/java/net/snowflake/client/internal/jdbc/ResultSetLatestIT.java Adds coverage asserting VECTOR metadata (getColumnType, getColumnClassName, isCaseSensitive).
src/main/java/net/snowflake/client/internal/jdbc/SnowflakeResultSetMetaDataV1.java Maps VECTOR to Types.VARCHAR for case-sensitivity and Java class name resolution.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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