#12101·ibis

bug: drop_table / cache cleanup emit empty DROP TABLE IF EXISTS with sqlglot 30.18

Author: coadyCreated Sep 4, 2026Updated Sep 4, 2026
Labelsbug

What happened?

With sqlglot 30.18.0, ibis SQL backends generate invalid DROP statements because they still construct sge.Drop(..., this=table). That release made a deliberate breaking change (this → tables; tobymao/sqlglot#8229], so the generator ignores this and emits:

DROP TABLE IF EXISTS DuckDB then fails with Parser Error: syntax error at end of input. Same pattern hits drop_view, memtable/cache finalizers, and some create_table paths that DROP a temp view afterward.

ibis currently allows sqlglot>=23.4,!=26.32.0 with no upper bound, so 30.18 installs by default.

Minimal repro

python
import ibis
con = ibis.duckdb.connect()
con.raw_sql("CREATE TABLE src(x INTEGER)")
con.drop_table("src", force=True)
# _duckdb.ParserException: Parser Error: syntax error at end of input

What version of ibis are you using?

12.0.0

What backend(s) are you using, if any?

duckdb: 1.5.5

Relevant log output

bash
_duckdb.ParserException: Parser Error: syntax error at end of input
  
  
    warnings.warn(pytest.PytestUnraisableExceptionWarning(msg))

Code of Conduct

  • I agree to follow this project's Code of Conduct