Eliaaazzz opened a new pull request, #37299:
URL: https://github.com/apache/beam/pull/37299

   # Description
   `Fixes #37289 `: Replaces direct access to the internal `_type_hints` 
attribute with the public `get_type_hints()` accessor in 
`ExternalTransform.expand()`.
   
   # Why this is needed
   Directly accessing `self._type_hints` causes an `AttributeError` if the type 
hints have not been explicitly initialized before the expansion phase. This 
issue was observed specifically when using `StorageWriteToBigQuery` with 
`with_auto_sharding=True`, which triggers an `ExternalTransform` expansion 
where `_type_hints` is missing.
   
   Using `get_type_hints()` is the correct, defensive approach as it ensures 
valid type hints (or an empty instance) are returned, preventing the crash.
   
   # Testing
   - Reproduced the crash locally using a script involving 
`StorageWriteToBigQuery` with auto-sharding enabled.
   - Verified that the fix resolves the `AttributeError` and allows the 
pipeline to proceed past the expansion phase.
   
   # Checklist
   - [x] Mention the appropriate issue in your description (for example: 
`addresses #123`), if applicable. This will automatically add a link to the 
pull request in the issue. If you would like the issue to automatically close 
on merging the pull request, comment `fixes #<ISSUE NUMBER>` instead.
   - [ ] Update `CHANGES.md` with noteworthy changes.
   - [ ] If this contribution is large, please file an Apache [Individual 
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   
   
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to