delta-io / delta

An open-source storage framework that enables building a Lakehouse architecture with compute engines including Spark, PrestoDB, Flink, Trino, and Hive and APIs
https://delta.io
Apache License 2.0
7.62k stars 1.71k forks source link

[Spark] Table features protocols should handle legacy reader features as reader features #3672

Closed zhipengmao-db closed 2 months ago

zhipengmao-db commented 2 months ago

Which Delta project/connector is this regarding?

Description

This PR fixes a bug where protocol (2, 7) is not considered to support reader features. This issue could manifest in several places. For example, it would result in hiding (2, x) features in the reader features list when it was the only reader feature present. For example, Protocol(2, 7, None, Set(ColumnMapping, RowTracking).

How was this patch tested?

Added new test and adapted existing tests.

Does this PR introduce any user-facing changes?

No.