Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not add readerFeatures or writerFeatures keys under checkpoint files if minReaderVersion or minWriterVersion do not satisfy the requirements #2360

Closed
MusKaya opened this issue Mar 29, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@MusKaya
Copy link

MusKaya commented Mar 29, 2024

Environment

Delta-rs version: 0.16.1

Binding:

Environment:

  • Cloud provider: AWS
  • OS: Linux
  • Other:

Bug

What happened: When creating checkpoints for a table that has delta.minReaderVersion < 3, protocol.readerFeatures key (with empty array value) is created in the beginning of the checkpoint parquet file.
Example:

{"metaData": null, "protocol": {"minReaderVersion": 1, "minWriterVersion": 2, "writerFeatures": [], "readerFeatures": []}, "txn": null, "add": null, "remove": null}
{"metaData": {"id": "dfba8203-b89f-4501-9f77-7d0d6d597e50", "name": null, "description": null, "schemaString": "{\"type\":\"struct\",\"fields\":[...
...

This causes certain query engines (in this case, Trino) fail with readerFeatures must not exist when minReaderVersion is less than 3.
Example:

select count(*) from test_fua_delta_lake_uncompacted_4;
Query 20240329_000911_00000_q83vs failed: readerFeatures must not exist when minReaderVersion is less than 3

Since readerFeatures require minReaderVersion 3 and writerFeatures require minWriterVersion 7, these two keys (protocol.readerFeatures and protocol.writerFeatures) should not be added when delta.minReaderVersion < 3 and delta.minWriterVersion < 7, respectively.

What you expected to happen: protocol.readerFeatures and protocol.writerFeatures should not be added to the top of the checkpoint parquet files when delta.minReaderVersion < 3 and delta.minWriterVersion < 7, respectively.

How to reproduce it: Create a table in Trino and then commit & create checkpoint from delta-rs to that table. Then do a SELECT COUNT(*) query against the table in Trino.

More details:

@MusKaya MusKaya added the bug Something isn't working label Mar 29, 2024
@MusKaya MusKaya changed the title Do not add readerFeatures or writerFeatures keys if minReaderVersion or minWriterVersion do not satisfy the requirements Do not add readerFeatures or writerFeatures keys under checkpoint files if minReaderVersion or minWriterVersion do not satisfy the requirements Mar 29, 2024
@ion-elgreco
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants