Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(descheming): remove remaining internal usage of deprecated schema #8767

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ibis/backends/datafusion/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ def create_table(
with self._safe_raw_sql(create_stmt):
pass

return self.table(name, schema=database)
return self.table(name, database=database)

def truncate_table(
self, name: str, database: str | None = None, schema: str | None = None
Expand Down
4 changes: 2 additions & 2 deletions ibis/backends/duckdb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@
).sql(self.name)
)

return self.table(name, schema=database)
return self.table(name, database=database)

def _load_into_cache(self, name, expr):
self.create_table(name, expr, schema=expr.schema(), temp=True)
Expand Down Expand Up @@ -1060,7 +1060,7 @@
with self._safe_raw_sql(query_con):
pass

return self.table(table_name, schema=database, database=catalog)
return self.table(table_name, database=(database, catalog))

Check warning on line 1063 in ibis/backends/duckdb/__init__.py

View check run for this annotation

Codecov / codecov/patch

ibis/backends/duckdb/__init__.py#L1063

Added line #L1063 was not covered by tests

def read_sqlite(self, path: str | Path, table_name: str | None = None) -> ir.Table:
"""Register a table from a SQLite database into a DuckDB table.
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/mssql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@ def create_table(
cur.execute(f"EXEC sp_rename '{old}', '{new}'")

if schema is None:
return self.table(name, schema=database)
return self.table(name, database=database)

# preserve the input schema if it was provided
return ops.DatabaseTable(
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/mysql/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def create_table(
)

if schema is None:
return self.table(name, schema=database)
return self.table(name, database=database)

# preserve the input schema if it was provided
return ops.DatabaseTable(
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/postgres/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ def create_table(
)

if schema is None:
return self.table(name, schema=database)
return self.table(name, database=database)

# preserve the input schema if it was provided
return ops.DatabaseTable(
Expand Down
2 changes: 1 addition & 1 deletion ibis/backends/risingwave/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ def create_table(
)

if schema is None:
return self.table(name, schema=database)
return self.table(name, database=database)

# preserve the input schema if it was provided
return ops.DatabaseTable(
Expand Down
2 changes: 1 addition & 1 deletion ibis/tests/benchmarks/test_benchmarks.py
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ def test_snowflake_medium_sized_to_pandas(benchmark):
# to make the benchmark fast enough for development, yet large enough to show a
# difference if there's a performance hit
lineitem = con.table(
"LINEITEM", schema="TPCH_SF1", database="SNOWFLAKE_SAMPLE_DATA"
"LINEITEM", database=("SNOWFLAKE_SAMPLE_DATA", "TPCH_SF1")
).limit(1_000_000)

benchmark.pedantic(lineitem.to_pandas, rounds=5, iterations=1, warmup_rounds=1)
Expand Down
Loading