abey79 opened a new issue, #1369:
URL: https://github.com/apache/datafusion-python/issues/1369
**Is your feature request related to a problem or challenge? Please describe
what you are trying to do.**
Consider this snippet:
```python
import datafusion as dfn
import pyarrow as pa
ctx = dfn.SessionContext()
data = {"id": [1, 2, 3], "name": ["Alice", "Bob", "Charlie"], "age": [25,
30, 35]}
table = pa.Table.from_pydict(data)
ctx.register_record_batches("users", [table.to_batches()])
df = ctx.table("users")
df.select("does_not_exist")
```
I'm getting the following error:
```
Exception: DataFusion error: SchemaError(FieldNotFound { field: Column {
relation: None, name: "does_not_exist" }, valid_fields: [Column { relation:
Some(Bare { table: "users" }), name: "id" }, Column { relation: Some(Bare {
table: "users" }), name: "name" }, Column { relation: Some(Bare { table:
"users" }), name: "age" }] }, Some(""))
```
**Describe the solution you'd like**
While technically correct, the above error is not very user-friendly.
Something like `field "does_not_exists" was not found, valid fields: "id",
"name"` would be preferable.
**Describe alternatives you've considered**
n/a
**Additional context**
I had a cursory look at the code, and it seems that:
- `DataFusionError` implements `Display`
- `Debug` is [used instead] in the bindings
I haven't tested, but maybe it's a matter of just changing the line above.
--
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]