You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "wjones127 (via GitHub)" <gi...@apache.org> on 2023/05/30 17:31:04 UTC

[GitHub] [arrow-rs] wjones127 opened a new issue, #4312: PyArrow conversions could return TypeError if provided incorrect Python type

wjones127 opened a new issue, #4312:
URL: https://github.com/apache/arrow-rs/issues/4312

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   
   Right now, we bubble up an error like
   
   ```
   AttributeError: 'XXX' object has no attribute '_export_to_c'
   ```
   
   When we instead probably want something more like:
   
   ```
   TypeError: expected `pyarrow.Schema` but got object of type 'XXX'
   ```
   
   **Describe the solution you'd like**
   
   Check for the correct Python type and return the TypeError if applicable.
   
   **Describe alternatives you've considered**
   
   We could support duck typing anything that supports `_export_to_c`, but I don't think that's safe right now. In the future, there may be an improved protocol that would allow better handling: https://github.com/apache/arrow/pull/35739
   
   **Additional context**
   <!--
   Add any other context or screenshots about the feature request here.
   -->
   


-- 
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-unsubscribe@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow-rs] tustvold closed issue #4312: PyArrow conversions could return TypeError if provided incorrect Python type

Posted by "tustvold (via GitHub)" <gi...@apache.org>.
tustvold closed issue #4312: PyArrow conversions could return TypeError if provided incorrect Python type
URL: https://github.com/apache/arrow-rs/issues/4312


-- 
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-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org