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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]