Copilot commented on code in PR #436:
URL: https://github.com/apache/fluss-rust/pull/436#discussion_r2901621183
##########
bindings/python/src/metadata.rs:
##########
@@ -220,7 +220,12 @@ impl Schema {
.collect()
}
- // TODO: support primaryKey
+ fn get_primary_keys(&self) -> Vec<String> {
+ self.__schema
+ .primary_key()
+ .map(|pk| pk.column_names().to_vec())
+ .unwrap_or_default()
+ }
Review Comment:
New Python API method `Schema.get_primary_keys()` is added in the PyO3
bindings, but the package type stubs (`bindings/python/fluss/__init__.pyi`)
still define `Schema` without this method. This will leave typing users
(mypy/IDE autocomplete) out of sync with runtime behavior; please update the
stub to include `def get_primary_keys(self) -> List[str]: ...` for `Schema`.
##########
bindings/python/src/metadata.rs:
##########
@@ -220,7 +220,12 @@ impl Schema {
.collect()
}
Review Comment:
`Schema.get_primary_keys()` is missing a Rust doc comment (`/// ...`) while
the adjacent Schema methods have doc comments. Adding one keeps the generated
Python docstrings/help output consistent across the API surface.
```suggestion
/// Get primary key column names
```
--
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]