Abyss-lord commented on code in PR #10861:
URL: https://github.com/apache/gravitino/pull/10861#discussion_r3198702697
##########
clients/client-python/gravitino/api/catalog.py:
##########
@@ -189,7 +190,7 @@ def as_model_catalog(self) -> "ModelCatalog": # noqa: F821
"""
raise UnsupportedOperationException("Catalog does not support model
operations")
Review Comment:
fix
##########
clients/client-python/gravitino/api/file/fileset.py:
##########
@@ -209,3 +211,6 @@ def properties(self) -> Dict[str, str]:
The properties of the fileset object. Empty map is returned if no
properties are set.
"""
pass
+
+ def supports_tags(self) -> SupportsTags:
+ raise UnsupportedOperationException("Table does not support tag
operations.")
Review Comment:
fix
##########
clients/client-python/gravitino/api/model/model.py:
##########
@@ -72,3 +74,6 @@ def latest_version(self) -> int:
The latest version of the model object.
"""
pass
+
+ def supports_tags(self) -> SupportsTags:
+ raise UnsupportedOperationException("Table does not support tag
operations.")
Review Comment:
fix
##########
clients/client-python/gravitino/api/schema.py:
##########
@@ -43,3 +45,6 @@ def comment(self) -> Optional[str]:
def properties(self) -> Dict[str, str]:
"""Returns the properties of the Schema. An empty dictionary is
returned if no properties are set."""
return {}
+
+ def supports_tags(self) -> SupportsTags:
+ raise UnsupportedOperationException("Table does not support tag
operations.")
Review Comment:
fix
##########
clients/client-python/tests/integration/test_supports_tags.py:
##########
@@ -0,0 +1,416 @@
+# 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 typing as tp
+from random import randint
+
+from gravitino import Catalog, GravitinoAdminClient, GravitinoClient,
GravitinoMetalake
+from gravitino.api.file.fileset import Fileset
+from gravitino.api.model.model import Model
+from gravitino.api.rel.table import Table
+from gravitino.api.rel.table_catalog import TableCatalog
+from gravitino.api.rel.types.types import Types
+from gravitino.api.tag import Tag
+from gravitino.api.tag.supports_tags import SupportsTags
+from gravitino.dto.rel.column_dto import ColumnDTO
+from gravitino.dto.rel.partitioning.identity_partitioning_dto import (
+ IdentityPartitioningDTO,
+)
+from gravitino.exceptions.base import NoSuchTagException
+from gravitino.name_identifier import NameIdentifier
+from tests.integration.containers.hdfs_container import HDFSContainer
+from tests.integration.integration_test_env import IntegrationTestEnv
+
+# pylint: disable=too-many-instance-attributes
+
+
+class TestSupportsTags(IntegrationTestEnv):
+ relational_catalog_provider: str = "hive"
+ fileset_comment: str = "fileset_comment"
+ catalog_location_prop: str = "location"
+
+ fileset_location: str = "/tmp/TestFilesetCatalog"
+ fileset_properties_key1: str = "fileset_properties_key1"
+ fileset_properties_value1: str = "fileset_properties_value1"
+ fileset_properties_key2: str = "fileset_properties_key2"
+ fileset_properties_value2: str = "fileset_properties_value2"
+ fileset_properties: tp.Dict[str, str] = {
+ fileset_properties_key1: fileset_properties_value1,
+ fileset_properties_key2: fileset_properties_value2,
+ }
+ multiple_locations_fileset_properties: tp.Dict[str, str] = {
+ Fileset.PROPERTY_DEFAULT_LOCATION_NAME: "location1",
+ **fileset_properties,
+ }
Review Comment:
fix
--
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]