kszucs edited a comment on pull request #856:
URL: https://github.com/apache/arrow-datafusion/pull/856#issuecomment-896912735


   > My only concern is the addition of the `Py` prefix in a lot of public 
stuff. Doesn't this cause all public APIs in Python to be prepended by `Py` 
also? IMO there should not be any prefix.
   
   Right, the intent there is to expose the rust python objects under 
`datafusion.internals` (this is the current setup, though we can use any other 
submodule like `datafusion._lib`) and expose them under `datafusion` as aliases 
without the `Py` prefix. This provides us an additional python layer on top of 
the rust bindings where we can add pure python related functionality more 
easily, like:
   
   ```python
   from datafusion import internals
   
   class DataFrame(internals.PyDataFrame):
       # additional functionality 
   ```
   
   One additional advantage of using the `Py` prefix in the rust code is that 
it clearly indicates which rust types are actually python extension types.
   
   Note that this is a common approach for python bindings, see 
[py-polars](https://github.com/pola-rs/polars/tree/master/py-polars/polars) for 
example.
   


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