Skip to content

fix: decode path before lookup#3976

Merged
ion-elgreco merged 5 commits intodelta-io:mainfrom
ion-elgreco:fix/decode-path-before-lookup
Dec 23, 2025
Merged

fix: decode path before lookup#3976
ion-elgreco merged 5 commits intodelta-io:mainfrom
ion-elgreco:fix/decode-path-before-lookup

Conversation

@ion-elgreco
Copy link
Copy Markdown
Collaborator

@ion-elgreco ion-elgreco commented Dec 10, 2025

Description

Paths in the json log are double encoded, when we go over logical_file_view.path() the paths are decoded but when you access them directly in the add_actions_table they aren't so we need to decode as well here to be able to look up in the map properly.

Imho, the double encoding in the logs seems like a bug but seems to have been prevalent for a long time and this is just a tape fix to get old behavior back.

Related Issue(s)

@github-actions github-actions bot added the binding/rust Issues for the Rust crate label Dec 10, 2025
@ion-elgreco ion-elgreco enabled auto-merge (squash) December 10, 2025 13:01
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.52%. Comparing base (4c98931) to head (4d39589).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #3976       +/-   ##
===========================================
+ Coverage   25.76%   74.52%   +48.75%     
===========================================
  Files         127      156       +29     
  Lines       20539    41537    +20998     
  Branches    20539    41537    +20998     
===========================================
+ Hits         5292    30954    +25662     
+ Misses      14885     9196     -5689     
- Partials      362     1387     +1025     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Copy Markdown
Member

@rtyler rtyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to hold off on merging this until it's better understood as a regression and has a test case associated with it, since we have a lot of changes in the pipeline around paths/urls and log replay

@corwinjoy
Copy link
Copy Markdown
Contributor

corwinjoy commented Dec 11, 2025

In the draft PR where I examine adding support for full path URIs (#3963) this double encoding (once for JSON, and once for the object_store Path) is a major source of complications. If we could remove this, it would be great. If not, I would suggest a test where you use escape characters because this is where the double encoding gets complicated and tends to have problems. In addition, in the draft PR, AI suggested that there may be an existing bug with encoding the '%' character which it would be nice to test.
https://github.com/delta-io/delta-rs/pull/3963/files#r2609031682

@ion-elgreco ion-elgreco force-pushed the fix/decode-path-before-lookup branch from 2e30f0c to f394491 Compare December 14, 2025 17:48
Signed-off-by: Ion Koutsouris <15728914+ion-elgreco@users.noreply.github.com>
@ion-elgreco ion-elgreco force-pushed the fix/decode-path-before-lookup branch from f394491 to 57e8e2b Compare December 14, 2025 17:58
Signed-off-by: Ion Koutsouris <15728914+ion-elgreco@users.noreply.github.com>
@github-actions github-actions bot added the binding/python Issues for the Python package label Dec 14, 2025
@ion-elgreco ion-elgreco requested a review from rtyler December 23, 2025 07:52
@ion-elgreco ion-elgreco disabled auto-merge December 23, 2025 07:52
@ion-elgreco ion-elgreco enabled auto-merge (squash) December 23, 2025 07:52
Copy link
Copy Markdown
Member

@rtyler rtyler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test demonstrates the bug, thanks for adding @ion-elgreco

@ion-elgreco ion-elgreco merged commit f767ac0 into delta-io:main Dec 23, 2025
28 of 29 checks passed
ethan-tyler pushed a commit to ethan-tyler/delta-rs that referenced this pull request Jan 9, 2026
# Description
Paths in the json log are double encoded, when we go over
logical_file_view.path() the paths are decoded but when you access them
directly in the add_actions_table they aren't so we need to decode as
well here to be able to look up in the map properly.

Imho, the double encoding in the logs seems like a bug but seems to have
been prevalent for a long time and this is just a tape fix to get old
behavior back.

# Related Issue(s)
- closes delta-io#3939

---------

Signed-off-by: Ion Koutsouris <15728914+ion-elgreco@users.noreply.github.com>
Co-authored-by: R. Tyler Croy <rtyler@brokenco.de>
Co-authored-by: Robert Pack <42610831+roeap@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

binding/python Issues for the Python package binding/rust Issues for the Rust crate

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Bug]: _internal.DeltaError: Generic DeltaTable error: Unable to map __delta_rs_path to action during overwrite with predicate

4 participants