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

[GitHub] [arrow-datafusion-python] simicd opened a new issue, #259: Allow setting table name in `from_...` functions

simicd opened a new issue, #259:
URL: https://github.com/apache/arrow-datafusion-python/issues/259

   **Is your feature request related to a problem or challenge? Please describe what you are trying to do.**
   The functions introduced with #241 currently do not allow to specify a table name. By default the table name is a random hash making SQL queries more difficult to use.
   
   **Describe the solution you'd like**
   Be able to set table name in the `from_...` functions.
   
   **Before:**
   ```python
   ctx.from_pydict({"a": [1, 2, 3], "b": [4, None, 6]})           # -> Would like to set table name here...
   table_name = ctx.catalog().database().names().pop()  # ❌ ... so that table name is known and doesn't have to be derived like this
   result_df = ctx.sql(f"select a, is_null(b) as b_is_null from {table_name}")
   ```
   
   **After:**
   ```python
   ctx.from_pydict({"a": [1, 2, 3], "b": [4, None, 6]}, name="t")
   result_df = ctx.sql(f"select a, is_null(b) as b_is_null from t")
   ```
   
   Additionally update the UDF/UDAF SQL example introduced in PR #258 
   
   **Describe alternatives you've considered**
   n/a
   
   **Additional context**
   n/a
   


-- 
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-datafusion-python] andygrove closed issue #259: Allow setting table name in `from_...` functions

Posted by "andygrove (via GitHub)" <gi...@apache.org>.
andygrove closed issue #259: Allow setting table name in `from_...` functions
URL: https://github.com/apache/arrow-datafusion-python/issues/259


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