Skip to content

Improve backward compatibility tests for spec changes introduced in all table versions #2542

@yyanyy

Description

@yyanyy

Stem from this comment: #2521 (comment)

We had a NPE bug (#2405) caused by reading a newly introduced field as boolean, which assigns null to this boolean field when reading old tables. While Iceberg has backward compatibility tests to test reading V1 tables, this field is introduced for all specs, and thus when creating V1 table for testing, this field will still be populated. NPE only occurs in a wider setting - during table commits (fixed in #2495) or reading manifest table (fixed in #2521).

I think to prevent this from happening in future, we may need to introduce a mechanism that creates table not through Iceberg code itself, so that the new fields introduced to the spec can continue to be null. The comment link above describes a proposal to achieve it but there might be better approaches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions