gravitino icon indicating copy to clipboard operation
gravitino copied to clipboard

[#6577] docs: fix param typo from 'type' to 'catalog_type'

Open AndreVale69 opened this issue 10 months ago • 2 comments

What changes were proposed in this pull request?

Fix parameter typo for create_catalog function in hadoop-catalog fileset documentation and manage-fileset and manage-model. Change parameter typo from type to catalog_type.

Why are the changes needed?

Incorrect parameter name in the documentation.

Fix: #6577

Does this PR introduce any user-facing change?

No.

How was this patch tested?

None.

AndreVale69 avatar Mar 03 '25 13:03 AndreVale69

Thanks! but unfortunately, I think we don't need this, as Catalog.Type is already clear enough.

This sounds reasonable. Java API is as follows

  public Catalog createCatalog(
      String catalogName,
      Catalog.Type type,
      String provider,
      String comment,
      Map<String, String> properties)
      throws NoSuchMetalakeException, CatalogAlreadyExistsException {
    return getMetalake().createCatalog(catalogName, type, provider, comment, properties);
  }

Could you try to change python API and change the parameter name from catalog_type to type to make it consistent with JAVA API.

yuqi1129 avatar Mar 04 '25 03:03 yuqi1129

Thanks! but unfortunately, I think we don't need this, as Catalog.Type is already clear enough.

As @yuqi1129 suggested, I could try to modify the Python API to achieve consistency between the JAVA and Python APIs. This might be interesting for me since I'm a new contributor.

AndreVale69 avatar Mar 04 '25 06:03 AndreVale69

I think the change itself is good, because it indeed fix the doc issue.

As for the name consistency between Java and Python, since we already use catalog_type as a parameter name in Python, the change will break the compatibility, it is not worth doing for now.

jerryshao avatar Mar 07 '25 03:03 jerryshao