mirror of
https://github.com/lancedb/lancedb.git
synced 2026-01-13 07:12:57 +00:00
fix: propagate filter validation errors (#1092)
In Rust and Node, we have been swallowing filter validation errors. If there was an error in parsing the filter, then the filter was silently ignored, returning unfiltered results. Fixes #1081
This commit is contained in:
@@ -128,6 +128,11 @@ describe('LanceDB client', function () {
|
||||
assertResults(results)
|
||||
results = await table.where('id % 2 = 0').execute()
|
||||
assertResults(results)
|
||||
|
||||
// Should reject a bad filter
|
||||
await expect(table.filter('id % 2 = 0 AND').execute()).to.be.rejectedWith(
|
||||
/.*sql parser error: Expected an expression:, found: EOF.*/
|
||||
)
|
||||
})
|
||||
|
||||
it('uses a filter / where clause', async function () {
|
||||
|
||||
Reference in New Issue
Block a user