Skip to content

Commit

Permalink
small fix
Browse files Browse the repository at this point in the history
  • Loading branch information
KeXiangWang committed Mar 12, 2024
1 parent 469f0ae commit 5373f05
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
10 changes: 3 additions & 7 deletions ibis/backends/risingwave/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -284,9 +284,7 @@ def create_table(
cur.execute(insert_stmt)

if overwrite:
cur.execute(
sge.Drop(kind="TABLE", this=this, exists=True).sql(self.dialect)
)
self.drop_table(name, database=database, schema=schema, force=True)
cur.execute(
f"ALTER TABLE {table.sql(self.dialect)} RENAME TO {this.sql(self.dialect)}"
)
Expand Down Expand Up @@ -408,10 +406,8 @@ def create_materialized_view(
this = sg.table(name, catalog=database, quoted=self.compiler.quoted)
with self._safe_raw_sql(create_stmt) as cur:
if overwrite:
cur.execute(
sge.Drop(kind="MATERIALIZED VIEW", this=this, exists=True).sql(
self.dialect
)
self.drop_materialized_view(
name, database=database, schema=schema, force=True
)
cur.execute(
f"ALTER MATERIALIZED VIEW {table.sql(self.dialect)} RENAME TO {this.sql(self.dialect)}"
Expand Down
3 changes: 1 addition & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5373f05

Please sign in to comment.