Closed gy9527 closed 1 month ago
Hello. There are two ways to pass new values in the update
method: as SQL strings or as values. When you pass them in that overload, they are interpreted as SQL strings, which is why you get an error about converting to a string. If you want to pass Javascript values, instead use the values
option:
table.update({ where: "x = 2", values: { vector: [10, 10] } })
https://lancedb.github.io/lancedb/js/classes/Table/#updateopts
table.update({ where: "x = 2", values: { vector: [10, -10] } })
If I change one of the values to a negative value, it will throw a new error: [Error: lance error: Invalid user input: LanceError(IO): Only arrays of literals are supported in lance.
I encountered this issue because in my project, the vector values have both positive and negative numbers, which results in the same error. How should I solve this?
Oh that is the same as https://github.com/lancedb/lancedb/issues/1501
Which has yet to be fixed upstream: https://github.com/lancedb/lance/issues/2695
I'll prioritize fixing that soon.
LanceDB version
0.10.0
What happened?
The example of table update will report an error
Are there known steps to reproduce?