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

[Kernel] Adds protocol checks to the public getChanges API on TableImpl #3651

Closed allisonport-db closed 2 months ago

allisonport-db commented 2 months ago

Which Delta project/connector is this regarding?

Description

To avoid reading invalid tables, Kernel should check that any read protocol actions are supported by Kernel. This PR makes the current API private, and adds a public API around it that does this check when the Protocol is included in the list of actions to be read from the file.

Also removes the "byVersion" part of the API name since we are adding separate timestamp APIs in https://github.com/delta-io/delta/pull/3650.

How was this patch tested?

Adds unit tests.