When statically analyzing and manually reviewing the code, I noticed a potential logic conflicting in /src/datasets/table.py as follows:
def to_blocks(table: Union[pa.Table, Table]) -> list[list[TableBlock]]:
if isinstance(table, pa.Table):
return [[InMemoryTable(table)]]
elif isinstance(table, ConcatenationTable): # dead code
return copy.deepcopy(table.blocks)
else:
return [[table]]
Within the function, the condition isinstance(table, ConcatenationTable) at line 4 will never be True because the previous condition isinstance(table, pa.Table) at line 2 would have already caught all instances of ConcatenationTable (since ConcatenationTable is a subtype of pa.Table). This creates a logical conflict in the type checking flow.
Please verify if this logic is intentional or it is an issue warranting a refactoring or fixing.