This is an automated email from the ASF dual-hosted git repository.
jshao pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/gravitino.git
The following commit(s) were added to refs/heads/main by this push:
new 708b61055c [#6409] fix(client-python): Change to use `GenericFileset`
for the return value of fileset catalog (#6410)
708b61055c is described below
commit 708b61055c196c2d7042b452d41de3f97092024f
Author: Jerry Shao <[email protected]>
AuthorDate: Mon Feb 10 14:22:52 2025 +0800
[#6409] fix(client-python): Change to use `GenericFileset` for the return
value of fileset catalog (#6410)
### What changes were proposed in this pull request?
This PR changes the return value to `GenericFileset` for fileset
operation.
### Why are the changes needed?
Previously, it returns the plain fileset dto, so that it cannot support
some operations like get credentials.
Fix: #6409
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Existing tests.
---
clients/client-python/gravitino/client/fileset_catalog.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/clients/client-python/gravitino/client/fileset_catalog.py
b/clients/client-python/gravitino/client/fileset_catalog.py
index df0ecf579e..39a095ba9a 100644
--- a/clients/client-python/gravitino/client/fileset_catalog.py
+++ b/clients/client-python/gravitino/client/fileset_catalog.py
@@ -178,7 +178,7 @@ class FilesetCatalog(BaseSchemaCatalog,
SupportsCredentials):
fileset_resp = FilesetResponse.from_json(resp.body, infer_missing=True)
fileset_resp.validate()
- return fileset_resp.fileset()
+ return GenericFileset(fileset_resp.fileset(), self.rest_client,
full_namespace)
def alter_fileset(self, ident: NameIdentifier, *changes) -> Fileset:
"""Update a fileset metadata in the catalog.
@@ -187,7 +187,7 @@ class FilesetCatalog(BaseSchemaCatalog,
SupportsCredentials):
ident: A fileset identifier, which should be "schema.fileset"
format.
changes: The changes to apply to the fileset.
- Args:
+ Raises:
IllegalArgumentException If the changes are invalid.
NoSuchFilesetException If the fileset does not exist.
@@ -212,7 +212,7 @@ class FilesetCatalog(BaseSchemaCatalog,
SupportsCredentials):
fileset_resp = FilesetResponse.from_json(resp.body, infer_missing=True)
fileset_resp.validate()
- return fileset_resp.fileset()
+ return GenericFileset(fileset_resp.fileset(), self.rest_client,
full_namespace)
def drop_fileset(self, ident: NameIdentifier) -> bool:
"""Drop a fileset from the catalog.