Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-1452552: ResultSetMetadata with VECTOR column does not provide a means of inferring its dimension #1774

Closed
JackMatthewRimmer opened this issue May 28, 2024 · 7 comments
Assignees
Labels
bug status-merged status-triage_done Initial triage done, will be further handled by the driver team

Comments

@JackMatthewRimmer
Copy link

JackMatthewRimmer commented May 28, 2024

Driver version: 3.16.1

OS: Linux

Java version: 17

When in my SnowflakeResultSetMetadata I have a column of type VECTOR, I can infer the type in its fields such as INT or FLOAT but there is no means of being able to understand what is its dimension size.

I would expect that somewhere in the metadata I am able to get the dimension size of the VECTOR type for that column.
Apologies if I am missing something

@github-actions github-actions bot changed the title ResultSetMetadata with VECTOR column does not provide a means of inferring its dimension SNOW-1452552: ResultSetMetadata with VECTOR column does not provide a means of inferring its dimension May 28, 2024
@sfc-gh-wfateem sfc-gh-wfateem self-assigned this May 28, 2024
@sfc-gh-wfateem sfc-gh-wfateem added the status-triage Issue is under initial triage label May 28, 2024
@JackMatthewRimmer
Copy link
Author

Hi @sfc-gh-wfateem Just wanted to check in and ask if there's any update on this ?
Thanks,
Jack

@sfc-gh-wfateem
Copy link
Collaborator

Hey @JackMatthewRimmer,

I was just looking into this today. I first wanted to see if we get the information about a vector's dimensions from the backend to begin with. I have been able to confirm that this information is, in fact, returned to us, so we should be able to present that information somehow in the ResultSetMetadata.

It's not the most convenient approach, but If you're looking for any kind of solution to get the dimensions for now, you can do something like this:

// Assuming you have this table in Snowflake:
// create or replace table JDBC_VECTOR(float_vec VECTOR(FLOAT, 256), int_vec VECTOR(INT, 16))

Statement stmt = connection.createStatement();
stmt.executeQuery("show columns in MY_DB.MY_SCHEMA.MY_TABLE");
ResultSet resultSet = statement.getResultSet();
resultSet.next();
resultSet.getString(3); // value: FLOAT_VEC
resultSet.getString(4); // value: {"type":"VECTOR","nullable":true,"vectorElementType":{"type":"REAL","nullable":false},"dimension":256}

You can extract the dimension from the JSON data returned.

@JackMatthewRimmer
Copy link
Author

Hi @sfc-gh-wfateem,

Thank you for having a look at this. Unfortunately the way our system is built it requires the data being present in the ResultSetMetadata. Would you possible be able to give a rough idea about how long it may take before this would make its way into a release ?

Thanks,
Jack

@sfc-gh-wfateem
Copy link
Collaborator

@JackMatthewRimmer We release a new version once a month. Versions 3.16.1 was released end of May, so in theory the next release would be end of June, however, because of the Snowflake Summit I would expect that to have some impact on the release schedule. Roughly, you're looking at the end of June/beginning of July. You also need to be aware that there are priorities, so just depending on the issues we have in the pipeline we might not get around to this in the next release.
In case this is important to your team's work and you have some important deadlines, then I would recommend you open a support case with Snowflake and share that context so that the team can prioritize this for you, if possible.

@sfc-gh-wfateem sfc-gh-wfateem added status-triage_done Initial triage done, will be further handled by the driver team and removed status-triage Issue is under initial triage labels Jun 4, 2024
@JackMatthewRimmer
Copy link
Author

@sfc-gh-wfateem Thank you for your responses 🙏 . I think we will look at raising a support ticket.
Thanks,
Jack

@sfc-gh-wfateem
Copy link
Collaborator

@JackMatthewRimmer PR #1788 is currently in review and will address this.

@sfc-gh-wfateem sfc-gh-wfateem added status-pr_pending_merge A PR is made and is under review status-merged status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. and removed status-pr_pending_merge A PR is made and is under review labels Jun 12, 2024
@sfc-gh-wfateem
Copy link
Collaborator

@JackMatthewRimmer this has been released in JDBC v3.17.0. I'll go ahead and close the issue at this point, but if you still have any issues with this fix in v3.17.0 please let us know.

@sfc-gh-wfateem sfc-gh-wfateem removed the status-fixed_awaiting_release The issue has been fixed, its PR merged, and now awaiting the next release cycle of the connector. label Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug status-merged status-triage_done Initial triage done, will be further handled by the driver team
Projects
None yet
Development

No branches or pull requests

2 participants