cccs-eric opened a new pull request #3988:
URL: https://github.com/apache/iceberg/pull/3988


   python_legacy was missing support for Decimal conversion.  An error would be 
raised every time such a conversion happened:
   ```
    File 
"/home/.local/lib/python3.8/site-packages/iceberg/api/types/conversions.py", 
line 93, in from_byte_buffer
   [2022-01-25, 17:16:23 UTC] {custom_pod_launcher.py:53} INFO -     return 
Conversions.internal_from_byte_buffer(type_var.type_id, buffer_var)
   [2022-01-25, 17:16:23 UTC] {custom_pod_launcher.py:53} INFO -   File 
"/home/.local/lib/python3.8/site-packages/iceberg/api/types/conversions.py", 
line 98, in internal_from_byte_buffer
   [2022-01-25, 17:16:23 UTC] {custom_pod_launcher.py:53} INFO -     return 
Conversions.from_byte_buff_mapping.get(type_id)(type_id, buffer_var)
   [2022-01-25, 17:16:23 UTC] {custom_pod_launcher.py:53} INFO - TypeError: 
'NoneType' object is not callable
   ```
   This error occurs since the map doesn't contain a lambda function for the 
Decimal TypeID.
   
   I added such functions, but needed to change the argument to 
`from_byte_buff_mapping`.  Used to be TypeID, now Type.  The public interfaces 
do not change, so it should be backward compatible.  The 
`internal_from_byte_buffer` is not needed anymore, so I removed it.  This 
*could* break compatibility, but nobody should be using this function outside 
Iceberg...


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



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to