Skip to content

Commit

Permalink
Another fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
ppanopticon committed Jan 18, 2024
1 parent ba290fd commit ad08212
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import java.util.*
*/
@Serializable
@SerialName("ValueList")
class ValueList(val value: List<PublicValue>): Expression() {
class ValueList(val value: Array<PublicValue>): Expression() {
constructor(list: List<Any>): this(when (list.first()) {
is Boolean -> list.filterIsInstance<Boolean>().map { BooleanValue(it) }
is Byte -> list.filterIsInstance<Byte>().map { ByteValue(it) }
Expand All @@ -32,7 +32,7 @@ class ValueList(val value: List<PublicValue>): Expression() {
is FloatArray -> list.filterIsInstance<FloatArray>().map { FloatVectorValue(it) }
is DoubleArray -> list.filterIsInstance<DoubleArray>().map { DoubleVectorValue(it) }
else -> throw IllegalArgumentException("Cannot create ValueList from list of type ${list.first().javaClass.simpleName}.")
})
}.toTypedArray())

override fun toGrpc(): CottontailGrpc.Expression {
val builder = CottontailGrpc.Expression.newBuilder()
Expand Down

0 comments on commit ad08212

Please sign in to comment.