iceberg-python icon indicating copy to clipboard operation
iceberg-python copied to clipboard

Compare `Schema` and `StructType` fields irrespective of ordering

Open kevinjqliu opened this issue 9 months ago • 0 comments

Fixes #674

Schema and StructType fields variable is represented by Tuple, which means that ordering matters when performing comparison.

Two Schemas with the same fields in different order should be consider the same

https://github.com/apache/iceberg-python/blob/7bd5d9e6c32bcc5b46993d6bfaeed50471e972ae/pyiceberg/schema.py#L88 https://github.com/apache/iceberg-python/blob/7bd5d9e6c32bcc5b46993d6bfaeed50471e972ae/pyiceberg/types.py#L346

kevinjqliu avatar May 04 '24 18:05 kevinjqliu