XiaoHongbo-Hope commented on code in PR #436:
URL: https://github.com/apache/fluss-rust/pull/436#discussion_r2901671131


##########
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`.
   
   Added



-- 
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