Skip to content

Commit 7858037

Browse files
committed
minor
1 parent 933430e commit 7858037

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libs/libcommon/src/libcommon/duckdb_utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ def create_index(
213213
fts_schema: str,
214214
extensions_directory: Optional[str] = None,
215215
) -> None:
216+
# the sql commands comes from the fts extension that uses placeholders
216217
placeholders: dict[str, str] = {
217-
"database": database,
218218
"input_table": input_table,
219219
"stemmer": stemmer,
220220
"input_id": input_id,
@@ -343,9 +343,9 @@ def _parallel_sql(command: str, job_database: str, rank: int, field_id: int) ->
343343
) as con:
344344
# merge tokenizations
345345
union_fields_query = " UNION ALL ".join(
346-
f"SELECT * FROM tmp_{rank}_{i}.tokenized" # nosec - rank and i are safe
346+
f"SELECT * FROM tmp_{rank}_{field_id}.tokenized" # nosec - rank and i are safe
347347
for rank in range(num_jobs)
348-
for i in range(len(columns))
348+
for field_id in range(len(columns))
349349
)
350350
_sql(con, f"CREATE TABLE tmp.tokenized AS {union_fields_query}")
351351

0 commit comments

Comments
 (0)