96 Commits
Author SHA1 Message Date
PerryLink 55fadb4c56 Reject a semicolon in a SQL query instead of silently cutting the statement (#1388) 2026-10-11 17:21:01 -04:00
davidmezzetti 62099b9a34 Cleanup open connection in test 2026-10-11 12:03:14 -04:00
Jasper ca9563daac Use only the query argument of similar() clauses in terms and explain (#1367) 2026-10-09 10:29:46 -04:00
Yuilona edf61d1d4a Use each query's hybrid weights when batching similar clauses (#1359) 2026-10-07 16:21:36 -04:00
Raashish Aggarwal b2ff9bd85c Sort NULL values like SQLite when merging ordered results (#1353) 2026-10-07 13:09:08 -04:00
Raashish Aggarwal 9c718f7876 Merge aggregate columns written in uppercase across shards (#1352) 2026-10-07 09:00:39 -04:00
Yash Raj Pandey 408c25d201 Explain DuckDB query errors that abort the transaction (#1341) 2026-10-07 06:34:30 -04:00
David Mezzetti 2e8493dfca Merge pull request #1338 from serhiizghama/fix/duckdb-bind-parameter-order
Keep DuckDB bind values in query order when a parameter repeats
2026-10-05 08:53:15 -04:00
Gaurav Chintakunta ffcbc0b815 Skip NULL aggregate values from shards with no matching rows (#1331) 2026-10-05 06:17:05 -04:00
serhiizghama 346bb9d282 Test a repeated bind parameter followed by another parameter 2026-10-05 11:12:23 +07:00
Grapette.L ff5aec468a Fix DuckDB bind parameters followed by a non-word character not being converted (#1325) 2026-10-04 09:01:16 -04:00
Yash Raj Pandey 00622f2cf1 Parse true and false as boolean literals in SQL queries (#1316) 2026-10-02 14:28:51 -04:00
davidmezzetti 5cba72c88a Update pylintrc file and remove warning overrides for new limits 2026-09-29 07:11:03 -04:00
Amir Fathi 7cb6bd09db Fix DuckDB.formatargs dropping repeated named bind parameters (#1253) 2026-09-22 12:22:45 -04:00
Serhii Zghama 2e8a3d7892 fix(database): don't drop rows when sorting or grouping by a JSON field (#1238) 2026-09-14 10:19:52 -04:00
Amir Fathi 72f9ca7605 Fix Cluster combining avg() as an unweighted mean of shard averages (#1237) 2026-09-14 10:18:52 -04:00
davidmezzetti d59c88424d Code cleanup 2026-07-21 12:59:57 -04:00
Andrew Chen 46467a3453 Raise SQLError on empty select expressions and a dangling AS (#1147) 2026-07-21 12:24:12 -04:00
davidmezzetti fcfd340ff1 Cleanup tests 2026-07-21 12:18:35 -04:00
Andrew Chen d6f696d795 Fix Aggregate IndexError on a SQL query that matched nothing across shards (#1139) 2026-07-21 11:19:28 -04:00
davidmezzetti 638a2e12b1 Validate resolver target classes, closes #1153 2026-07-21 09:13:43 -04:00
davidmezzetti aa0a8cfc32 Cleanup code from #1125 2026-07-02 10:37:57 -04:00
Sanjay Santhanam 796c5bb0a8 Raise SQLError on unterminated bracket, function and similar clauses
The token consumer loops in Expression.bracket(), Expression.function() and
Expression.similar() read the next token with next(iterator, (None, None)) but
never checked for the end-of-stream sentinel. When a clause was left
unterminated (e.g. "select [a from txtai", "select func(a from txtai" or
"select * from txtai where similar('abc'"), the iterator was exhausted and the
code indexed tokens[None], raising a cryptic

    TypeError: list indices must be integers or slices, not NoneType

instead of the SQLError that the database layer documents and callers catch for
invalid SQL. The parse step runs before the query is handed to the database, so
this TypeError escaped the SQLError wrapping in Database.execute().

Add Expression.advance(), a small helper that wraps next() and raises SQLError
when the token stream is exhausted mid-clause, and route the three delimited
consumer loops through it. Auto-closing the clause instead was rejected because
it would silently reinterpret malformed input (e.g. "select [a" would become the
valid column "a"), masking the user error. This mirrors the existing None-guard
convention already used in Expression.compound().

Behavior on valid queries is unchanged (advance() only diverges from the old
code path when the iterator is empty). Adds testUnterminated covering
unterminated bracket, function and similar clauses.
2026-07-01 23:11:21 -07:00
davidmezzetti 3073589ad6 Add deterministic setting to database functions closes #1048. Add ability to index database expressions #1049 2026-02-22 16:38:54 -05:00
davidmezzetti a53b431492 Add support for custom SQL functions with DuckDB, closes #1047 2026-02-21 06:43:56 -05:00
davidmezzetti 00acd243b0 Code standardization and added tests #1041 2026-02-18 14:18:11 -05:00
Rin 5a66065b34 Escape single quotes in dynamic column names to prevent SQL injection (#1026) 2026-02-15 10:50:45 -05:00
davidmezzetti a543b028ef Syntax update 2025-09-17 07:59:20 -04:00
davidmezzetti ad55344f26 Change default behavior for pickle serialization to disabled, closes #949 2025-08-13 12:20:41 -04:00
davidmezzetti 6ca8a61856 Update test to workaround HF Hub HTTP 429 issues, closes #926 2025-07-04 09:27:20 -04:00
davidmezzetti a1a7d34cd8 Embeddings index checkpointing, closes #695 2025-02-19 16:44:37 -05:00
davidmezzetti 2e0dfb36d9 Update comments 2024-12-28 14:14:22 -05:00
davidmezzetti 3f7bb71a3e Persist embeddings components to specified schema, closes #829 2024-12-04 15:18:05 -05:00
davidmezzetti 285769c971 Update build script #805 2024-10-29 13:25:58 -04:00
davidmezzetti 1d5323516e Update build script #805 2024-10-29 12:54:27 -04:00
davidmezzetti 9a670cd5ec Update default vector model logic for embeddings.batchtransform 2024-02-28 13:28:50 -05:00
davidmezzetti 88430d7824 Add support for dynamic vector dimensions, pass options to underlying vector models and move vector model caching. Closes #674. Closes #675. Closes #678 2024-02-27 21:20:51 -05:00
davidmezzetti fd6bf1263d Fix various issues with subindex reloading #618 2024-02-02 12:15:40 -05:00
davidmezzetti 168f7e4efd Change default embeddings config to json, closes #652, Store index ids outside of config when content is disabled, closes #653. 2024-01-30 17:12:33 -05:00
davidmezzetti b35290ddab Add feature to return embeddings search results as graph, closes #644 2024-01-23 13:55:41 -05:00
davidmezzetti 7b2546883e Add support for SQL bind parameters, closes #564 2023-11-07 11:00:11 -05:00
davidmezzetti 0f35409219 Add scalar quantization support to vectors, closes #583 2023-10-27 15:01:40 -04:00
davidmezzetti aadda6b5f7 Update reindex action to support new 6.x configuration, closes #557 2023-09-19 15:31:47 -04:00
davidmezzetti c911f3438f Update test 2023-08-25 21:01:01 -04:00
davidmezzetti a1b92e0a33 Add metadata support for client-server databases, closes #532 2023-08-25 20:47:34 -04:00
davidmezzetti 9c504ec8a4 Refactor database tests to fix class structure 2023-08-09 20:51:09 -04:00
davidmezzetti 3d2f12127a Update tests 2023-08-09 11:47:30 -04:00
davidmezzetti 3fbbdc1d2f Update comment 2023-08-09 07:27:54 -04:00
davidmezzetti ea7c811b82 Add additional indexes for embeddings, closes #515 2023-08-09 07:19:25 -04:00
davidmezzetti 20d8df17b0 Add support for configurable text/object fields, closes #512 2023-07-28 22:15:21 -04:00