[ 
https://issues.apache.org/jira/browse/CASSANDRA-19167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17810112#comment-17810112
 ] 

Ekaterina Dimitrova edited comment on CASSANDRA-19167 at 1/24/24 12:21 AM:
---------------------------------------------------------------------------

With TRACE enabled I can see the exact cql that is used by the test, so I 
validated I am not running something different in cqlsh:
{code:java}
First enable user_defined_functions_enabled=true
CREATE KEYSPACE IF NOT EXISTS k1 WITH replication = {'class': 'SimpleStrategy', 
'replication_factor': 1};
CREATE TABLE k1.t1 (pk int primary key, value vector<int, 2>);
INSERT INTO k1.t1 (pk, value) VALUES (0, [1,2]);
CREATE FUNCTION k1.ft1 (x vector<int, 2>) CALLED ON NULL INPUT RETURNS 
vector<int, 2> LANGUAGE java AS 'return x;';
SELECT kt1.f1(value) FROM k1.t1;
 
// returns [1,2]
 
CREATE FUNCTION k1.f2 (x list<vector<int, 2>>) CALLED ON NULL INPUT RETURNS 
list<vector<int, 2>>  LANGUAGE java  AS 'return x;’;
SELECT k1.f2([value]) FROM k1.t1;
 
// returns        [[1, 2]]
{code}
I looked into the rest of the test configuration and found nothing that could 
change things to the extend that it will trigger the reported error. 

I will continue digging...

 


was (Author: e.dimitrova):
With TRACE enabled I can see the exact cql that is used by the test, so I 
validated I am not running something different in cqlsh:



 
{code:java}
First enable user_defined_functions_enabled=true
CREATE KEYSPACE IF NOT EXISTS k1 WITH replication = {'class': 'SimpleStrategy', 
'replication_factor': 1};
CREATE TABLE k1.t1 (pk int primary key, value vector<int, 2>);
INSERT INTO k1.t1 (pk, value) VALUES (0, [1,2]);
CREATE FUNCTION k1.ft1 (x vector<int, 2>) CALLED ON NULL INPUT RETURNS 
vector<int, 2> LANGUAGE java AS 'return x;';
SELECT kt1.f1(value) FROM k1.t1;
 
// returns [1,2]
 
CREATE FUNCTION k1.f2 (x list<vector<int, 2>>) CALLED ON NULL INPUT RETURNS 
list<vector<int, 2>>  LANGUAGE java  AS 'return x;’;
SELECT k1.f2([value]) FROM k1.t1;
 
// returns        [[1, 2]]
{code}

I looked into the rest of the test configuration and found nothing that could 
change things to the extend that it will trigger that mistake. 

I will continue digging...

 

> Test failure: CQLVectorTest fails with heap_buffers
> ---------------------------------------------------
>
>                 Key: CASSANDRA-19167
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-19167
>             Project: Cassandra
>          Issue Type: Bug
>          Components: Feature/Vector Search
>            Reporter: Branimir Lambov
>            Assignee: Ekaterina Dimitrova
>            Priority: Normal
>             Fix For: 5.0-rc, 5.x
>
>
> When {{memtable_allocation_type}} is set to {{heap_buffers}}, the {{udf}} 
> test fails with
> {code}
> org.apache.cassandra.cql3.functions.types.exceptions.InvalidTypeException: 
> Invalid 32-bits integer value, expecting 4 bytes but got 6
>       at 
> org.apache.cassandra.cql3.functions.types.TypeCodec$IntCodec.deserializeNoBoxing(TypeCodec.java:1695)
>       at 
> org.apache.cassandra.cql3.functions.types.TypeCodec$PrimitiveIntCodec.deserialize(TypeCodec.java:842)
>       at 
> org.apache.cassandra.cql3.functions.types.TypeCodec$PrimitiveIntCodec.deserialize(TypeCodec.java:819)
>       at 
> org.apache.cassandra.cql3.functions.types.VectorCodec$FixedLength.deserialize(VectorCodec.java:135)
>       at 
> org.apache.cassandra.cql3.functions.types.VectorCodec$FixedLength.deserialize(VectorCodec.java:83)
>       at 
> org.apache.cassandra.cql3.functions.types.TypeCodec$AbstractCollectionCodec.deserialize(TypeCodec.java:2141)
>       at 
> org.apache.cassandra.cql3.functions.types.TypeCodec$AbstractCollectionCodec.deserialize(TypeCodec.java:2082)
>       at 
> org.apache.cassandra.cql3.functions.UDFDataType.compose(UDFDataType.java:180)
>       at 
> org.apache.cassandra.cql3.functions.FunctionArguments.set(FunctionArguments.java:142)
>       at 
> org.apache.cassandra.cql3.selection.AbstractFunctionSelector.setArg(AbstractFunctionSelector.java:277)
>       at 
> org.apache.cassandra.cql3.selection.ScalarFunctionSelector.getOutput(ScalarFunctionSelector.java:58)
>       at 
> org.apache.cassandra.cql3.selection.Selection$SelectionWithProcessing$1.getOutputRow(Selection.java:605)
>       at 
> org.apache.cassandra.cql3.selection.ResultSetBuilder.getOutputRow(ResultSetBuilder.java:175)
>       at 
> org.apache.cassandra.cql3.selection.ResultSetBuilder.build(ResultSetBuilder.java:162)
>       at 
> org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:999)
>       at 
> org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:564)
>       at 
> org.apache.cassandra.cql3.statements.SelectStatement.executeInternal(SelectStatement.java:600)
>       at 
> org.apache.cassandra.cql3.statements.SelectStatement.executeLocally(SelectStatement.java:570)
>       at 
> org.apache.cassandra.cql3.statements.SelectStatement.executeLocally(SelectStatement.java:108)
>       at 
> org.apache.cassandra.cql3.QueryProcessor.executeInternal(QueryProcessor.java:445)
>       at 
> org.apache.cassandra.cql3.CQLTester.executeFormattedQuery(CQLTester.java:1597)
>       at org.apache.cassandra.cql3.CQLTester.execute(CQLTester.java:1576)
>       at 
> org.apache.cassandra.cql3.validation.operations.CQLVectorTest.udf(CQLVectorTest.java:427)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to