Skip to content

Commit b9e068d

Browse files
committed
Fix qualifier stripping for pdb tokenizer namespaces
1 parent 457554d commit b9e068d

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

paradedb/sqlalchemy/alembic.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,20 @@ def _strip_non_pdb_qualifiers(expr: str) -> str:
239239
while j < len(expr) and (expr[j].isalnum() or expr[j] == "_"):
240240
j += 1
241241

242+
token = expr[i:j]
242243
if j < len(expr) and expr[j] == ".":
243-
token = expr[i:j]
244244
if token.lower() != "pdb":
245+
# Drop relation-like qualifier prefixes, e.g. public.products.
245246
i = j + 1
246247
continue
248+
out.append(token)
249+
out.append(".")
250+
i = j + 1
251+
continue
252+
253+
out.append(token)
254+
i = j
255+
continue
247256

248257
out.append(ch)
249258
i += 1

0 commit comments

Comments
 (0)