[jira] [Commented] (CASSANDRA-18652) Improve vector value validation errors
[ https://issues.apache.org/jira/browse/CASSANDRA-18652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17741538#comment-17741538 ] Andres de la Peña commented on CASSANDRA-18652: --- Committed to {{trunk}} as [c95e5a556709cf131ba074680585106559ff9511|https://github.com/apache/cassandra/commit/c95e5a556709cf131ba074680585106559ff9511]. > Improve vector value validation errors > -- > > Key: CASSANDRA-18652 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18652 > Project: Cassandra > Issue Type: Improvement > Components: Cluster/Schema >Reporter: Andres de la Peña >Assignee: Andres de la Peña >Priority: Normal > Fix For: 5.x > > Time Spent: 50m > Remaining Estimate: 0h > > Some of the error messages shown when trying to bind a vector column with a > wrong value are a bit obscure. For example, if we try to write a value with > the wrong number of dimensions: > {code} > createTable("CREATE TABLE %s (pk int primary key, value vector)"); > execute("INSERT INTO %s (pk, value) VALUES (0, ?)", vector(1)); > {code} > The error is: > {code} > java.lang.IndexOutOfBoundsException: Attempted to read 4, but the size is 0 > {code} > I understand that we cannot provide a lot of information about a > non-understandable bind value, since we don't even know whether it's a vector > or something entirely different. But we could try to improve it a bit and > throw a {{MarshalException}} that will be translated to a > {{InvalidRequestException}}, and provide generic messages similar to those > used by collections: > {code} > InvalidRequestException: Not enough bytes to read a vector > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-18652) Improve vector value validation errors
[ https://issues.apache.org/jira/browse/CASSANDRA-18652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17741338#comment-17741338 ] Ekaterina Dimitrova commented on CASSANDRA-18652: - The tests have finished OK, thank you. This is ready to commit. > Improve vector value validation errors > -- > > Key: CASSANDRA-18652 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18652 > Project: Cassandra > Issue Type: Improvement > Components: Cluster/Schema >Reporter: Andres de la Peña >Assignee: Andres de la Peña >Priority: Normal > Fix For: 5.x > > Time Spent: 50m > Remaining Estimate: 0h > > Some of the error messages shown when trying to bind a vector column with a > wrong value are a bit obscure. For example, if we try to write a value with > the wrong number of dimensions: > {code} > createTable("CREATE TABLE %s (pk int primary key, value vector)"); > execute("INSERT INTO %s (pk, value) VALUES (0, ?)", vector(1)); > {code} > The error is: > {code} > java.lang.IndexOutOfBoundsException: Attempted to read 4, but the size is 0 > {code} > I understand that we cannot provide a lot of information about a > non-understandable bind value, since we don't even know whether it's a vector > or something entirely different. But we could try to improve it a bit and > throw a {{MarshalException}} that will be translated to a > {{InvalidRequestException}}, and provide generic messages similar to those > used by collections: > {code} > InvalidRequestException: Not enough bytes to read a vector > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-18652) Improve vector value validation errors
[ https://issues.apache.org/jira/browse/CASSANDRA-18652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17741137#comment-17741137 ] Andres de la Peña commented on CASSANDRA-18652: --- Thanks for the review :) I usually add the {{CHANGES.txt}} entry on commit to ease rebase and not show trivial merge conflicts on the PR. Re-running {{{}j11_cqlshlib_cython_tests{}}}: [https://app.circleci.com/pipelines/github/adelapena/cassandra/3007/workflows/64c75a2d-ee19-436a-bc9f-7b930d2d32fe] > Improve vector value validation errors > -- > > Key: CASSANDRA-18652 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18652 > Project: Cassandra > Issue Type: Improvement > Components: Cluster/Schema >Reporter: Andres de la Peña >Assignee: Andres de la Peña >Priority: Normal > Fix For: 5.x > > Time Spent: 50m > Remaining Estimate: 0h > > Some of the error messages shown when trying to bind a vector column with a > wrong value are a bit obscure. For example, if we try to write a value with > the wrong number of dimensions: > {code} > createTable("CREATE TABLE %s (pk int primary key, value vector)"); > execute("INSERT INTO %s (pk, value) VALUES (0, ?)", vector(1)); > {code} > The error is: > {code} > java.lang.IndexOutOfBoundsException: Attempted to read 4, but the size is 0 > {code} > I understand that we cannot provide a lot of information about a > non-understandable bind value, since we don't even know whether it's a vector > or something entirely different. But we could try to improve it a bit and > throw a {{MarshalException}} that will be translated to a > {{InvalidRequestException}}, and provide generic messages similar to those > used by collections: > {code} > InvalidRequestException: Not enough bytes to read a vector > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-18652) Improve vector value validation errors
[ https://issues.apache.org/jira/browse/CASSANDRA-18652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17741124#comment-17741124 ] Ekaterina Dimitrova commented on CASSANDRA-18652: - Please remember the CHANGES.txt entry on commit. cqlshlib tests failed with J8 in your last run. Can you rerun that job, please? Just in case... +1 on green cqlshlib tests. > Improve vector value validation errors > -- > > Key: CASSANDRA-18652 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18652 > Project: Cassandra > Issue Type: Improvement > Components: Cluster/Schema >Reporter: Andres de la Peña >Assignee: Andres de la Peña >Priority: Normal > Fix For: 5.x > > Time Spent: 50m > Remaining Estimate: 0h > > Some of the error messages shown when trying to bind a vector column with a > wrong value are a bit obscure. For example, if we try to write a value with > the wrong number of dimensions: > {code} > createTable("CREATE TABLE %s (pk int primary key, value vector)"); > execute("INSERT INTO %s (pk, value) VALUES (0, ?)", vector(1)); > {code} > The error is: > {code} > java.lang.IndexOutOfBoundsException: Attempted to read 4, but the size is 0 > {code} > I understand that we cannot provide a lot of information about a > non-understandable bind value, since we don't even know whether it's a vector > or something entirely different. But we could try to improve it a bit and > throw a {{MarshalException}} that will be translated to a > {{InvalidRequestException}}, and provide generic messages similar to those > used by collections: > {code} > InvalidRequestException: Not enough bytes to read a vector > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-18652) Improve vector value validation errors
[ https://issues.apache.org/jira/browse/CASSANDRA-18652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17740654#comment-17740654 ] Maxwell Guo commented on CASSANDRA-18652: - LGTM~~~ > Improve vector value validation errors > -- > > Key: CASSANDRA-18652 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18652 > Project: Cassandra > Issue Type: Improvement > Components: Cluster/Schema >Reporter: Andres de la Peña >Assignee: Andres de la Peña >Priority: Normal > Fix For: 5.x > > Time Spent: 50m > Remaining Estimate: 0h > > Some of the error messages shown when trying to bind a vector column with a > wrong value are a bit obscure. For example, if we try to write a value with > the wrong number of dimensions: > {code} > createTable("CREATE TABLE %s (pk int primary key, value vector)"); > execute("INSERT INTO %s (pk, value) VALUES (0, ?)", vector(1)); > {code} > The error is: > {code} > java.lang.IndexOutOfBoundsException: Attempted to read 4, but the size is 0 > {code} > I understand that we cannot provide a lot of information about a > non-understandable bind value, since we don't even know whether it's a vector > or something entirely different. But we could try to improve it a bit and > throw a {{MarshalException}} that will be translated to a > {{InvalidRequestException}}, and provide generic messages similar to those > used by collections: > {code} > InvalidRequestException: Not enough bytes to read a vector > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-18652) Improve vector value validation errors
[ https://issues.apache.org/jira/browse/CASSANDRA-18652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17740647#comment-17740647 ] Andres de la Peña commented on CASSANDRA-18652: --- Yes, that failure is due to a test using {{BigInteger.TWO}}, which isn't available in JDK 8. I've started new runs with a fix for that and including the review feedback: ||PR||CI|| |[trunk|https://github.com/apache/cassandra/pull/2469]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/3007/workflows/90715d4e-ceda-46a4-a51a-25b6c7bc173b] [j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/3007/workflows/d1686fac-a3f8-4d1c-9790-83d8d8d525ae]| > Improve vector value validation errors > -- > > Key: CASSANDRA-18652 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18652 > Project: Cassandra > Issue Type: Improvement > Components: Cluster/Schema >Reporter: Andres de la Peña >Assignee: Andres de la Peña >Priority: Normal > Fix For: 5.x > > Time Spent: 50m > Remaining Estimate: 0h > > Some of the error messages shown when trying to bind a vector column with a > wrong value are a bit obscure. For example, if we try to write a value with > the wrong number of dimensions: > {code} > createTable("CREATE TABLE %s (pk int primary key, value vector)"); > execute("INSERT INTO %s (pk, value) VALUES (0, ?)", vector(1)); > {code} > The error is: > {code} > java.lang.IndexOutOfBoundsException: Attempted to read 4, but the size is 0 > {code} > I understand that we cannot provide a lot of information about a > non-understandable bind value, since we don't even know whether it's a vector > or something entirely different. But we could try to improve it a bit and > throw a {{MarshalException}} that will be translated to a > {{InvalidRequestException}}, and provide generic messages similar to those > used by collections: > {code} > InvalidRequestException: Not enough bytes to read a vector > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-18652) Improve vector value validation errors
[ https://issues.apache.org/jira/browse/CASSANDRA-18652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17740608#comment-17740608 ] Maxwell Guo commented on CASSANDRA-18652: - java8 occurs build failed. [~adelapena] > Improve vector value validation errors > -- > > Key: CASSANDRA-18652 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18652 > Project: Cassandra > Issue Type: Improvement > Components: Cluster/Schema >Reporter: Andres de la Peña >Assignee: Andres de la Peña >Priority: Normal > Fix For: 5.x > > Time Spent: 0.5h > Remaining Estimate: 0h > > Some of the error messages shown when trying to bind a vector column with a > wrong value are a bit obscure. For example, if we try to write a value with > the wrong number of dimensions: > {code} > createTable("CREATE TABLE %s (pk int primary key, value vector)"); > execute("INSERT INTO %s (pk, value) VALUES (0, ?)", vector(1)); > {code} > The error is: > {code} > java.lang.IndexOutOfBoundsException: Attempted to read 4, but the size is 0 > {code} > I understand that we cannot provide a lot of information about a > non-understandable bind value, since we don't even know whether it's a vector > or something entirely different. But we could try to improve it a bit and > throw a {{MarshalException}} that will be translated to a > {{InvalidRequestException}}, and provide generic messages similar to those > used by collections: > {code} > InvalidRequestException: Not enough bytes to read a vector > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-18652) Improve vector value validation errors
[ https://issues.apache.org/jira/browse/CASSANDRA-18652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17740579#comment-17740579 ] Andres de la Peña commented on CASSANDRA-18652: --- ||PR||CI|| |[trunk|https://github.com/apache/cassandra/pull/2469]|[j8|https://app.circleci.com/pipelines/github/adelapena/cassandra/3005/workflows/8d13f34c-0447-457b-9822-627256c20809] [j11|https://app.circleci.com/pipelines/github/adelapena/cassandra/3005/workflows/f572fe3a-6856-44fb-b17f-4f9a651c286b]| > Improve vector value validation errors > -- > > Key: CASSANDRA-18652 > URL: https://issues.apache.org/jira/browse/CASSANDRA-18652 > Project: Cassandra > Issue Type: Improvement > Components: Cluster/Schema >Reporter: Andres de la Peña >Assignee: Andres de la Peña >Priority: Normal > Time Spent: 10m > Remaining Estimate: 0h > > Some of the error messages shown when trying to bind a vector column with a > wrong value are a bit obscure. For example, if we try to write a value with > the wrong number of dimensions: > {code} > createTable("CREATE TABLE %s (pk int primary key, value vector)"); > execute("INSERT INTO %s (pk, value) VALUES (0, ?)", vector(1)); > {code} > The error is: > {code} > java.lang.IndexOutOfBoundsException: Attempted to read 4, but the size is 0 > {code} > I understand that we cannot provide a lot of information about a > non-understandable bind value, since we don't even know whether it's a vector > or something entirely different. But we could try to improve it a bit and > throw a {{MarshalException}} that will be translated to a > {{InvalidRequestException}}, and provide generic messages similar to those > used by collections: > {code} > InvalidRequestException: Not enough bytes to read a vector > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org