diff --git a/ibis/backends/sql/compilers/base.py b/ibis/backends/sql/compilers/base.py index e64c664ee6bb..02b198ab930a 100644 --- a/ibis/backends/sql/compilers/base.py +++ b/ibis/backends/sql/compilers/base.py @@ -46,7 +46,7 @@ def AlterTable(*args, kind="TABLE", **kwargs): try: from sqlglot.expressions import AlterRename as RenameTable -except AttributeError: +except ImportError: from sqlglot.expressions import RenameTable # noqa: F401