Skip to content

Commit

Permalink
refactor(exasol): add temp kwarg to create_table for api consistency
Browse files Browse the repository at this point in the history
Exasol doesn't support temp tables, but neither does PySpark or other backends.
  • Loading branch information
gforsyth authored and kszucs committed Feb 12, 2024
1 parent 89abf8e commit 4267c72
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion ibis/backends/exasol/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ def create_table(
schema: sch.Schema | None = None,
database: str | None = None,
overwrite: bool = False,
temp: bool = False,
) -> ir.Table:
"""Create a table in Snowflake.
Expand All @@ -289,13 +290,20 @@ def create_table(
overwrite
If `True`, replace the table if it already exists, otherwise fail
if the table exists
temp
Create a temporary table (not supported)
"""
if obj is None and schema is None:
raise ValueError("Either `obj` or `schema` must be specified")

if temp:
raise com.UnsupportedOperationError(
"Creating temp tables is not supported by Exasol."
)

if database is not None and database != self.current_database:
raise com.UnsupportedOperationError(
"Creating tables in other databases is not supported by Postgres"
"Creating tables in other databases is not supported by Exasol"
)
else:
database = None
Expand Down

0 comments on commit 4267c72

Please sign in to comment.