tshauck commented on code in PR #8546:
URL: https://github.com/apache/arrow-datafusion/pull/8546#discussion_r1428355818
##########
docs/source/library-user-guide/adding-udfs.md:
##########
@@ -432,3 +433,80 @@ Then, we can query like below:
```rust
let df = ctx.sql("SELECT geo_mean(a) FROM t").await?;
```
+
+## Adding a User-Defined Table Function
+
+A User-Defined Table Function (UDTF) is a function that takes parameters and
returns a `TableProvider`.
+
+Because we're returning a `TableProvider`, in this example we'll use the
`MemTable` data source to represent a table. This is a simple struct that holds
a set of RecordBatches in memory and treats them as a table. In your case, this
would be replaced with your own struct that implements `TableProvider`. See the
[example][4] for a working example that reads from a CSV file.
Review Comment:
Thanks for the feedback! I just pushed
[a090783](https://github.com/apache/arrow-datafusion/pull/8546/commits/a09078367caca6171afa8e9c542490f1f5ac8f80)
which expands a bit on why they're nice and adds the parquet metadata use-case
since it shows why they're nice for interactive analysis.
--
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]