tsungchih commented on code in PR #10689: URL: https://github.com/apache/gravitino/pull/10689#discussion_r3048473839
########## clients/client-python/tests/integration/test_relational_catalog.py: ########## @@ -0,0 +1,311 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. + +import logging +from random import randint + +from gravitino import ( + Catalog, + GravitinoAdminClient, + GravitinoClient, + NameIdentifier, +) +from gravitino.api.rel.column import Column +from gravitino.api.rel.expressions.distributions.distributions import Distributions +from gravitino.api.rel.expressions.transforms.transforms import Transforms +from gravitino.api.rel.indexes.indexes import Indexes +from gravitino.api.rel.table import Table +from gravitino.api.rel.table_change import TableChange +from gravitino.api.rel.types.types import Types +from gravitino.client.relational_table import RelationalTable +from gravitino.exceptions.base import ( + NoSuchSchemaException, + NoSuchTableException, + TableAlreadyExistsException, +) +from gravitino.namespace import Namespace +from tests.integration.containers.hdfs_container import HDFSContainer +from tests.integration.integration_test_env import IntegrationTestEnv + +logger = logging.getLogger(__name__) + + +class TestRelationalCatalog(IntegrationTestEnv): + METALAKE_NAME: str = "TestRelationalTable_metalake" + str(randint(1, 10000)) + CATALOG_NAME: str = "relational_catalog" + CATALOG_PROVIDER: str = "hive" + SCHEMA_NAME: str = "test_schema" + TABLE_NAME: str = "test_table" + TABLE_IDENT: NameIdentifier = NameIdentifier.of(SCHEMA_NAME, TABLE_NAME) + TABLE_COMMENT: str = "Test table for relational catalog" + TABLE_PROPERTIES = {"property1": "value1", "property2": "value2"} + + @classmethod + def setUpClass(cls): + cls.hdfs_container: HDFSContainer = HDFSContainer() + hive_metastore_uri = f"thrift://{cls.hdfs_container.get_ip()}:9083" + logger.info("Started Hive container with metastore URI: %s", hive_metastore_uri) + cls.gravitino_admin_client = GravitinoAdminClient(uri="http://localhost:8090") Review Comment: Addressed -- 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]
