Skip to content

Commit

Permalink
Removed memtable function
Browse files Browse the repository at this point in the history
  • Loading branch information
ongdisheng committed Nov 27, 2024
1 parent d0bf306 commit 24ec50b
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions ibis-server/app/model/metadata/snowflake.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
from contextlib import closing

import ibis

from app.model import SnowflakeConnectionInfo
from app.model.data_source import DataSource
from app.model.metadata.dto import (
Expand Down Expand Up @@ -83,12 +81,7 @@ def get_constraints(self) -> list[Constraint]:
"""
with closing(self.connection.raw_sql(sql)) as cur:
fields = [field[0] for field in cur.description]
result = [dict(zip(fields, row)) for row in cur.fetchall()]
res = (
ibis.memtable(result).to_pandas().to_dict(orient="records")
if len(result) > 0
else []
)
res = [dict(zip(fields, row)) for row in cur.fetchall()]
constraints = []
for row in res:
constraints.append(
Expand Down

0 comments on commit 24ec50b

Please sign in to comment.