Skip to content

Commit

Permalink
chore: fix druid exception and test case
Browse files Browse the repository at this point in the history
  • Loading branch information
ncclementi committed Aug 1, 2024
1 parent 93f6810 commit 71368f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions ibis/backends/druid/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

import pydruid.db
import sqlglot as sg
from pydruid.db.exceptions import ProgrammingError

import ibis.common.exceptions as com
import ibis.expr.datatypes as dt
Expand All @@ -20,6 +19,7 @@
from ibis.backends.sql.compilers import DruidCompiler
from ibis.backends.sql.compilers.base import STAR
from ibis.backends.sql.datatypes import DruidType
from ibis.backends.tests.errors import PyDruidProgrammingError

if TYPE_CHECKING:
from collections.abc import Iterable, Mapping
Expand Down Expand Up @@ -139,7 +139,7 @@ def get_schema(
.from_(sg.table(table_name, db=database, catalog=catalog))
.sql(self.dialect)
)
except ProgrammingError as e:
except PyDruidProgrammingError as e:
if re.search(r"\bINVALID_INPUT\b", str(e)):
raise com.TableNotFound(table_name) from e

Expand Down
3 changes: 1 addition & 2 deletions ibis/backends/tests/test_join.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import ibis
import ibis.common.exceptions as com
import ibis.expr.schema as sch
from ibis.backends.tests.errors import PyDruidProgrammingError

sqlite_right_or_full_mark = pytest.mark.notyet(
["sqlite"],
Expand Down Expand Up @@ -292,7 +291,7 @@ def test_join_with_trivial_predicate(awards_players, predicate, how, pandas_valu
assert len(result) == len(expected)


@pytest.mark.notimpl(["druid"], raises=PyDruidProgrammingError)
@pytest.mark.notimpl(["druid"], raises=com.TableNotFound)
@pytest.mark.parametrize(
("how", "nrows", "gen_right", "keys"),
[
Expand Down

0 comments on commit 71368f7

Please sign in to comment.