Commit d0cf875
committed
fix: queryToSql generated duplicate WHERE with filterGroups + vectorSearch
When a query had filterGroups (OR filters) but no direct filters,
the vector search branch checked `query.filters.length > 0` which
was false — so it emitted `WHERE ... NEAR ...` even though a WHERE
clause had already been generated from filterGroups, producing invalid
SQL: `WHERE (a OR b) WHERE col NEAR [...]`.
Now checks whether any WHERE conditions were actually emitted.1 parent b07eb81 commit d0cf875
1 file changed
+2
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1061 | 1061 | | |
1062 | 1062 | | |
1063 | 1063 | | |
1064 | | - | |
| 1064 | + | |
| 1065 | + | |
1065 | 1066 | | |
1066 | 1067 | | |
1067 | 1068 | | |
| |||
0 commit comments