Skip to content

Commit bf7e46e

Browse files
committed
fix: remove UTable from TABLE_TYPES and update TableType class to reflect changes
1 parent 00b23e1 commit bf7e46e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

python/cocoindex/typing.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ def __class_getitem__(self, params):
102102
return Annotated[list[dtype], vector_info]
103103

104104

105-
TABLE_TYPES: tuple[str, str, str] = ("UTable", "KTable", "LTable")
105+
TABLE_TYPES: tuple[str, str] = ("KTable", "LTable")
106106
KEY_FIELD_NAME: str = "_key"
107107

108108

@@ -729,18 +729,16 @@ def encode(self) -> dict[str, Any]:
729729

730730
@dataclasses.dataclass
731731
class TableType:
732-
kind: Literal["UTable", "KTable", "LTable"]
732+
kind: Literal["KTable", "LTable"]
733733
row: StructSchema
734734
num_key_parts: int | None = None # Only for KTable
735735

736736
def __str__(self) -> str:
737737
if self.kind == "KTable":
738738
num_parts = self.num_key_parts if self.num_key_parts is not None else 1
739739
table_kind = f"KTable({num_parts})"
740-
elif self.kind == "LTable":
740+
else: # LTable
741741
table_kind = "LTable"
742-
else: # UTable
743-
table_kind = "Table"
744742

745743
return f"{table_kind}({self.row})"
746744

0 commit comments

Comments
 (0)