I am adding new features to an open source project(pillar) to migrate Cassandra tables. I have a problem in operation that insert values a new table. There is a table in Cassandra:
create table customer( name text, age int, point int, primary key(name, age) )
I want to migrate from this table to test_person table.
create table test_person ( name text, surname text, point int, city text, primary key(name) )
Here is an operation:
var s: PreparedStatement = session.prepare("insert into test_person (name, age, point) values (?, ?, ?)");var r: Row = session.execute("select * from customer").one()var arr: Array[AnyRef] = new Array[AnyRef](3)arr(0) = row.getObject("name")arr(1) = row.getObject("age")arr(2) = row.getObject("point")session.execute(s.bind(arr))
This is error message: Type mismatch Can't assign primitive value to object.
I got as object and assign an array typed of AnyRef. What is wrong?
How can I handle this