How to retrieve the column having datatype as “list” from the table of Cassandra?

前端 未结 2 1165
天涯浪人
天涯浪人 2021-01-18 21:49

I am using Scala to connect with Cassandra and applying my queries in it, I have created a simple table in Cassandra which has two columns row_id and row_values. row_id has

2条回答
  •  春和景丽
    2021-01-18 22:05

    Quick elaboration: You specify the java class. e.g.,

    val driverDerivedRow = MyRow(row.getString("s"), 
        row.getInt("i"), 
        row.getList("l", classOf[java.lang.Long])
        .asScala.toList.map(Long.unbox)
    

提交回复
热议问题