Skip to content

Commit

Permalink
fix(oracle): change filter inside select into case when
Browse files Browse the repository at this point in the history
  • Loading branch information
kangshung authored and cpcloud committed Nov 2, 2023
1 parent 84c08c6 commit c743fa2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ibis/backends/oracle/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ def list_tables(self, like=None, database=None, schema=None):

def _metadata(self, query: str) -> Iterable[tuple[str, dt.DataType]]:
from sqlalchemy_views import CreateView, DropView
from sqlalchemy import case

name = util.gen_name("oracle_metadata")

Expand Down Expand Up @@ -242,7 +243,7 @@ def _metadata(self, query: str) -> Iterable[tuple[str, dt.DataType]]:
t.c.data_type,
t.c.data_precision,
t.c.data_scale,
(t.c.nullable == "Y").label("nullable"),
case([(t.c.nullable == "Y", True)], else_=False).label("nullable"),
).where(t.c.table_name == name)

with self.begin() as con:
Expand Down

0 comments on commit c743fa2

Please sign in to comment.