Limit size of file to 128 MB - #295
Conversation
gshikhar2021
commented
Jul 21, 2026
- Snowflake does not support files greater than 128 MB in stage
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request implements a safety mechanism to prevent the processing of files larger than 128 MB. This change ensures compatibility with Snowflake's external stage limitations by validating file sizes before storage operations for both S3 and Google Drive data sources. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize the Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counterproductive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a 128 MB file size limit for S3 and Google Drive sources to prevent processing oversized files. While the S3 implementation checks the file size metadata upfront, the Google Drive implementation reads the entire file into memory before checking its size, posing an Out-of-Memory (OOM) risk. It is recommended to use io.LimitReader to safely restrict memory usage and to ensure robust cleanup of stale files that might grow beyond the limit.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
1374b2d to
ca3ac33
Compare
ca3ac33 to
298a1cc
Compare
- Snowflake does not support files greater than 128 MB in stage
298a1cc to
eb02601
Compare