Hi,
it would be nice to have a __or__ method in the Schema class to concatenate schemas. I cannot create a branch for this in the mean time, but if somebody could, here is an implementation proposal.
class Schema:
def __or__(self, other):
if not isinstance(other, Schema):
raise TypeError(f'{self.__class__.__name__} can only be concatenated with another `Schema`, found {type(other)}.'
concat_columns = self.columns.extend(other.columns)
concat_schemas = Schema(columns=concat_columns)
return concat_schemas
Hi, it would be nice to have a
__or__
method in theSchema
class to concatenate schemas. I cannot create a branch for this in the mean time, but if somebody could, here is an implementation proposal.