rdblue commented on code in PR #5488:
URL: https://github.com/apache/iceberg/pull/5488#discussion_r947173995
##########
python/pyiceberg/catalog/__init__.py:
##########
@@ -25,6 +26,41 @@
from pyiceberg.table.partitioning import UNPARTITIONED_PARTITION_SPEC,
PartitionSpec
from pyiceberg.table.sorting import UNSORTED_SORT_ORDER, SortOrder
from pyiceberg.typedef import EMPTY_DICT, Identifier, Properties
+from pyiceberg.utils.config import Config, merge_config
+
+logger = logging.getLogger(__name__)
+
+_env_config = Config()
+
+
+def load_catalog(name: str, uri: str, **properties: str | None) -> Catalog:
+ from pyiceberg.catalog.rest import RestCatalog
+
+ supported_catalogs: dict[str, type[Catalog]] = {"http": RestCatalog}
Review Comment:
Can we create this once and make it a constant?
##########
python/pyiceberg/catalog/__init__.py:
##########
@@ -25,6 +26,41 @@
from pyiceberg.table.partitioning import UNPARTITIONED_PARTITION_SPEC,
PartitionSpec
from pyiceberg.table.sorting import UNSORTED_SORT_ORDER, SortOrder
from pyiceberg.typedef import EMPTY_DICT, Identifier, Properties
+from pyiceberg.utils.config import Config, merge_config
+
+logger = logging.getLogger(__name__)
+
+_env_config = Config()
Review Comment:
Should this be all caps since it is a constant?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]