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

   attempts to fix several issues regarding avro <-> beam schema conversion in 
the python sdk
   
   1) https://github.com/apache/beam/issues/30750
   2) 
[VarInt.java](https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/util/VarInt.java#L103)
 expects ints and longs to be unsigned, however the current 
[implementation](https://github.com/apache/beam/blob/7097443e27c90857258e9478ddb83c9d7e32afce/sdks/python/apache_beam/io/avroio.py#L612)
 just returns the signed number, which causes an `IOException("varint overflow 
" + r)` exception to get thrown when using the converted beam schema with a 
`SqlTransform`
   
   NOTE: I'm not entirely sure about my logic here, since the resulting 
`beam.Rows` have the converted 2's complement number will get returned if the 
user doesn't apply a `SqlTransform` to their pipeline, but the previous 
implementation was also causing errors, so I'll need some help here
   3) in `avroio.py`'s 
[beam_value_to_avro_value](https://github.com/apache/beam/blob/7097443e27c90857258e9478ddb83c9d7e32afce/sdks/python/apache_beam/io/avroio.py#L702)
 function, it recurses on `avro_value_to_beam_value`, rather than the 
`beam_value_to_avro_value` function. I'm 99% sure this should be the other way 
around, however since the two functions are so similar this previously wasn't 
causing issues. I only noticed it when I added the custom logic to convert 
to/from signed and unsigned numbers.
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us 
incorporate your contribution quickly and easily:
   
    - [ ] 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).
   
   See the [Contributor Guide](https://beam.apache.org/contribute) for more 
tips on [how to make review process 
smoother](https://github.com/apache/beam/blob/master/CONTRIBUTING.md#make-the-reviewers-job-easier).
   
   To check the build health, please visit 
[https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md](https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md)
   
   GitHub Actions Tests Status (on master branch)
   
------------------------------------------------------------------------------------------------
   [![Build python source distribution and 
wheels](https://github.com/apache/beam/workflows/Build%20python%20source%20distribution%20and%20wheels/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Build+python+source+distribution+and+wheels%22+branch%3Amaster+event%3Aschedule)
   [![Python 
tests](https://github.com/apache/beam/workflows/Python%20tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Python+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Java 
tests](https://github.com/apache/beam/workflows/Java%20Tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Java+Tests%22+branch%3Amaster+event%3Aschedule)
   [![Go 
tests](https://github.com/apache/beam/workflows/Go%20tests/badge.svg?branch=master&event=schedule)](https://github.com/apache/beam/actions?query=workflow%3A%22Go+tests%22+branch%3Amaster+event%3Aschedule)
   
   See [CI.md](https://github.com/apache/beam/blob/master/CI.md) for more 
information about GitHub Actions CI or the [workflows 
README](https://github.com/apache/beam/blob/master/.github/workflows/README.md) 
to see a list of phrases to trigger workflows.
   


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