Skip to content

fix(indexing): escape apostrophes in LanceDB SQL path predicates - #13234

Open
seethinajayadileep wants to merge 1 commit into
continuedev:mainfrom
seethinajayadileep:fix/lancedb-escape-path-quotes
Open

fix(indexing): escape apostrophes in LanceDB SQL path predicates#13234
seethinajayadileep wants to merge 1 commit into
continuedev:mainfrom
seethinajayadileep:fix/lancedb-escape-path-quotes

Conversation

@seethinajayadileep

Copy link
Copy Markdown

Fixes #13233

Summary

LanceDbIndex built LanceDB delete/retrieve predicates by interpolating filesystem paths and cache keys into single-quoted SQL. Paths with apostrophes (don't.ts, it's a test/…) produced Unterminated string literal, so deletes failed (stale chunks stayed retrievable) and directory-filtered retrieval broke for whole workspaces.

Change

  • Add escapeLanceSqlString() (SQL-standard ''')
  • Use it for cachekey/path deletes, path LIKE retrieval filters, and UUID IN lookups
  • Unit tests for the escape helper

Test plan

  • Unit tests for escapeLanceSqlString
  • Index a file whose path contains an apostrophe, delete/rename it, confirm chunks are removed
  • Retrieve with a workspace directory that contains an apostrophe

Paths and cache keys with single quotes broke delete/retrieve predicates
(Unterminated string literal). Double-quote escape them for Lance SQL.

Fixes continuedev#13233

Signed-off-by: JAYA DILEEP <seethinajayadileep@hotmail.com>
@github-actions

github-actions Bot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@seethinajayadileep
seethinajayadileep marked this pull request as ready for review September 6, 2026 05:36
@seethinajayadileep
seethinajayadileep requested a review from a team as a code owner September 6, 2026 05:36
@seethinajayadileep
seethinajayadileep requested review from sestinj and removed request for a team September 6, 2026 05:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant