tsungchih commented on code in PR #10575:
URL: https://github.com/apache/gravitino/pull/10575#discussion_r3015774264


##########
clients/client-python/gravitino/client/relational_catalog.py:
##########
@@ -188,24 +193,96 @@ def list_tables(self, namespace: Namespace) -> 
list[NameIdentifier]:
             for ident in entity_list_resp.identifiers()
         ]
 
-    def load_table(self, identifier: NameIdentifier) -> Table:
+    @overload
+    def load_table(self, identifier: NameIdentifier) -> Table: ...
+
+    @overload
+    def load_table(  # pylint: disable=arguments-differ
+        self, identifier: NameIdentifier, required_privilege_names: 
set[Privilege.Name]
+    ) -> Table: ...
+
+    def load_table(
+        self,
+        identifier: NameIdentifier,
+        required_privilege_names: Optional[set[Privilege.Name]] = None,
+    ) -> Table:
         self._check_table_name_identifier(identifier)
         full_namespace = self._get_table_full_namespace(identifier.namespace())
+        query_params = (
+            {
+                RelationalCatalog.PRIVILEGES: ",".join(
+                    priv.name for priv in required_privilege_names
+                )
+            }
+            if required_privilege_names is not None

Review Comment:
   addressed



##########
clients/client-python/gravitino/dto/util/dto_converters.py:
##########
@@ -643,3 +659,146 @@ def to_dtos(dtos):
         if not dtos:
             return []
         return [DTOConverters.to_dto(dto) for dto in dtos]
+
+    @singledispatchmethod
+    @staticmethod
+    def _to_column_update_request(change) -> TableUpdateRequestBase:
+        raise IllegalArgumentException(
+            f"Unknown column change type: {change.__class__.__name__}"
+        )
+
+    @_to_column_update_request.register
+    @staticmethod
+    def _(change: AddColumn) -> TableUpdateRequestBase:
+        default_value = (
+            Column.DEFAULT_VALUE_NOT_SET
+            if change.get_default_value() is None
+            or change.get_default_value() == Column.DEFAULT_VALUE_NOT_SET
+            else DTOConverters.to_function_arg(change.get_default_value())
+        )
+        return TableUpdateRequest.AddTableColumnRequest(
+            _field_name=change.field_name(),
+            _data_type=change.get_data_type(),
+            _comment=change.get_comment(),
+            _position=change.get_position(),
+            _nullable=change.is_nullable(),
+            _auto_increment=change.is_auto_increment(),
+            _default_value=default_value,
+        )

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]

Reply via email to