Skip to content

Commit

Permalink
memory.py -> in_memory.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinjqliu committed Jan 22, 2024
1 parent 15236de commit df17ee3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pyiceberg/catalog/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def load_sql(name: str, conf: Properties) -> Catalog:


def load_memory(name: str, conf: Properties) -> Catalog:
from pyiceberg.catalog.memory import InMemoryCatalog
from pyiceberg.catalog.in_memory import InMemoryCatalog

return InMemoryCatalog(name, **conf)

Expand Down
File renamed without changes.
6 changes: 3 additions & 3 deletions tests/catalog/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
Catalog,
PropertiesUpdateSummary,
)
from pyiceberg.catalog.memory import InMemoryCatalog
from pyiceberg.catalog.in_memory import InMemoryCatalog
from pyiceberg.exceptions import (
NamespaceAlreadyExistsError,
NamespaceNotEmptyError,
Expand All @@ -50,7 +50,7 @@

@pytest.fixture
def catalog(tmp_path: PosixPath) -> InMemoryCatalog:
return InMemoryCatalog("test.in.memory.catalog", **{WAREHOUSE: tmp_path.absolute().as_posix(), "test.key": "test.value"})
return InMemoryCatalog("test.in.in_memory.catalog", **{WAREHOUSE: tmp_path.absolute().as_posix(), "test.key": "test.value"})


TEST_TABLE_IDENTIFIER = ("com", "organization", "department", "my_table")
Expand Down Expand Up @@ -461,4 +461,4 @@ def test_add_column_with_statement(catalog: InMemoryCatalog) -> None:

def test_catalog_repr(catalog: InMemoryCatalog) -> None:
s = repr(catalog)
assert s == "test.in.memory.catalog (<class 'pyiceberg.catalog.memory.InMemoryCatalog'>)"
assert s == "test.in.in_memory.catalog (<class 'pyiceberg.catalog.in_memory.InMemoryCatalog'>)"
4 changes: 2 additions & 2 deletions tests/cli/test_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
from click.testing import CliRunner
from pytest_mock import MockFixture

from pyiceberg.catalog.memory import DEFAULT_WAREHOUSE_LOCATION
from pyiceberg.catalog.in_memory import DEFAULT_WAREHOUSE_LOCATION
from pyiceberg.cli.console import run
from pyiceberg.partitioning import PartitionField, PartitionSpec
from pyiceberg.schema import Schema
Expand Down Expand Up @@ -53,7 +53,7 @@ def env_vars(mocker: MockFixture) -> None:

@pytest.fixture(name="catalog")
def fixture_catalog(mocker: MockFixture) -> InMemoryCatalog:
in_memory_catalog = InMemoryCatalog("test.in.memory.catalog", **{"test.key": "test.value"})
in_memory_catalog = InMemoryCatalog("test.in.in_memory.catalog", **{"test.key": "test.value"})
mocker.patch("pyiceberg.cli.console.load_catalog", return_value=in_memory_catalog)
return in_memory_catalog

Expand Down

0 comments on commit df17ee3

Please sign in to comment.