Skip to content

Commit 2042157

Browse files
add get_primary_keys in Schema and add comment at get_primary_keys
1 parent b569dd4 commit 2042157

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

bindings/python/fluss/__init__.pyi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
from enum import IntEnum
2121
from types import TracebackType
22-
from typing import Dict, Iterator, List, Optional, Tuple, Union, overload
22+
from typing import Any, Dict, Iterator, List, Optional, Tuple, Union, overload
2323

2424
import pandas as pd
2525
import pyarrow as pa
@@ -775,6 +775,7 @@ class Schema:
775775
def get_column_names(self) -> List[str]: ...
776776
def get_column_types(self) -> List[str]: ...
777777
def get_columns(self) -> List[Tuple[str, str]]: ...
778+
def get_primary_keys(self) -> List[str]: ...
778779
def __str__(self) -> str: ...
779780

780781
class TableDescriptor:

bindings/python/src/metadata.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ impl Schema {
220220
.collect()
221221
}
222222

223+
/// Get primary key column names, returns empty list if no primary key is defined
223224
fn get_primary_keys(&self) -> Vec<String> {
224225
self.__schema
225226
.primary_key()

0 commit comments

Comments
 (0)