TanuSharma2511 commented on issue #34435: URL: https://github.com/apache/beam/issues/34435#issuecomment-2761912936
I think I was able to trace the code. Because we are trying to open GCS path, from the [fileSystems.get_filesystem(path)](https://github.com/apache/beam/blob/3887dcbac583d7a11e6f874dca458a60bc688386/sdks/python/apache_beam/io/filesystems.py#L279C30-L279C50), fileSystem will be "GCSFileSystem". So, we are using [CompressedFile](https://github.com/apache/beam/blob/a81d7ccb7877b71a30f2694ee42ebbb4bc748068/sdks/python/apache_beam/io/gcp/gcsfilesystem.py#L157) here and when we are using file.read(), we are calling [read()](https://github.com/apache/beam/blob/3887dcbac583d7a11e6f874dca458a60bc688386/sdks/python/apache_beam/io/filesystem.py#L294) method of CompressedFile class. I think, [here](https://github.com/apache/beam/blob/3887dcbac583d7a11e6f874dca458a60bc688386/sdks/python/apache_beam/io/filesystem.py#L297) we can add: ```if num_bytes is None: num_bytes = DEFAULT_READ_BUFFER_SIZE``` Can anyone confirm this before I proceed to create a PR ? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@beam.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org