-
Couldn't load subscription status.
- Fork 8
fix: issue with path is returned from download_files is always set t… #731
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes a bug where the download_files method in the parquet input handler was not returning the downloaded file path, causing the code to always use the original remote path instead of the local downloaded path.
- Removes unnecessary local
pathvariable assignment - Updates
download_filescall to not capture return value since it modifiesself.pathdirectly - Ensures
pd.read_parquet()uses the correct path after download
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| await self.download_files(self.path) | ||
| # Use pandas native read_parquet which can handle both single files and directories | ||
| return pd.read_parquet(path) | ||
| return pd.read_parquet(self.path) |
Copilot
AI
Sep 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix assumes that download_files modifies self.path in-place, but this behavior is not evident from the code shown. If download_files doesn't update self.path to point to the downloaded local file, this will still read from the original remote path. Consider either ensuring download_files updates self.path or capturing its return value if it returns the local path.
application_sdk/inputs/parquet.py
Outdated
| if self.input_prefix and self.path: | ||
| path = await self.download_files(self.path) | ||
| await self.download_files(self.path) | ||
| # Use pandas native read_parquet which can handle both single files and directories | ||
| return pd.read_parquet(path) | ||
| return pd.read_parquet(self.path) |
Copilot
AI
Sep 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fix assumes that download_files modifies self.path in-place, but this behavior is not evident from the code shown. If download_files doesn't update self.path to point to the downloaded local file, this will still read from the original remote path. Consider either ensuring download_files updates self.path or capturing its return value if it returns the local path.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you look at the conflicts, comments from copilot and add a quick test for this? thanks!
Changelog
path was always set to none as the underlying methods inside
download_filesis returning NoneAdditional context (e.g. screenshots, logs, links)
Checklist
Copyleft License Compliance