Skip to content

Conversation

kevinzwang
Copy link
Member

Changes Made

Resolves #5024

Related Issues

Checklist

  • Documented in API Docs (if applicable)
  • Documented in User Guide (if applicable)
  • If adding a new documentation page, doc is added to docs/mkdocs.yml navigation
  • Documentation builds and is formatted properly (tag @/ccmao1130 for docs review)

@github-actions github-actions bot added the fix label Aug 22, 2025
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR fixes import path issues in the Rust scan builder code for Delta Lake and Iceberg table formats. The changes update Python module import paths from the old locations (daft.delta_lake.delta_lake_scan and daft.iceberg.iceberg_scan) to their new locations under the daft.io package (daft.io.delta_lake.delta_lake_scan and daft.io.iceberg.iceberg_scan).

The fix addresses a module restructuring that moved I/O-related components under the daft.io package structure. The Rust FFI (Foreign Function Interface) layer in src/daft-scan/src/builder.rs uses PyO3 to import and interact with Python modules for scan operations. When the Python modules were relocated but the Rust import paths weren't updated, it caused ModuleNotFoundError exceptions during runtime when using Spark Connect with these table formats.

This change aligns the Rust code with the current Python package structure, ensuring that the scan builder can successfully import and instantiate the appropriate Python scan operators for both Delta Lake and Iceberg table formats. The fix is surgical - only updating the two import statements without modifying any business logic or functionality.

Confidence score: 5/5

  • This PR is safe to merge with minimal risk
  • Score reflects simple import path corrections with no logic changes in non-critical refactoring
  • No files require special attention

1 file reviewed, no comments

Edit Code Review Bot Settings | Greptile

Copy link
Member Author

@kevinzwang kevinzwang left a comment

Choose a reason for hiding this comment

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

I want to add some tests and I noticed that we do have a sql read_iceberg test but it seems like it is skipped. @rchowell wondering if there is more context here about testing these features.

@rchowell
Copy link
Contributor

@kevinzwang this just wasn't tested at the time, only a manual test 🙃 #3701

@kevinzwang
Copy link
Member Author

@kevinzwang this just wasn't tested at the time, only a manual test 🙃 #3701

I'll take a look at adding something that can be run in CI then

@kevinzwang kevinzwang enabled auto-merge (squash) August 22, 2025 21:42
Copy link

codecov bot commented Aug 23, 2025

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 76.50%. Comparing base (d2e9c04) to head (6e2878b).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/daft-scan/src/builder.rs 50.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #5035      +/-   ##
==========================================
+ Coverage   76.04%   76.50%   +0.45%     
==========================================
  Files         945      945              
  Lines      129743   129741       -2     
==========================================
+ Hits        98669    99255     +586     
+ Misses      31074    30486     -588     
Files with missing lines Coverage Δ
src/daft-scan/src/builder.rs 45.48% <50.00%> (+7.78%) ⬆️

... and 13 files with indirect coverage changes

🚀 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.

@kevinzwang kevinzwang merged commit 1e570bb into main Aug 23, 2025
54 checks passed
@kevinzwang kevinzwang deleted the kevin/sql-read-fix branch August 23, 2025 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error in Daft server: Invalid argument: DaftError::PyO3Error ModuleNotFoundError: No module named 'daft.delta_lake'"
2 participants