You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/04/26 13:15:42 UTC
[GitHub] [arrow-datafusion] Ted-Jiang commented on pull request #2177: udtf support
Ted-Jiang commented on PR #2177:
URL: https://github.com/apache/arrow-datafusion/pull/2177#issuecomment-1109783993
@alamb @thinkharderdev @doki23 i met the same problem in #2343
if we treat it as a `Expr` , we need change it to `PhysicalExpr` but
``` rust
/// Evaluate an expression against a RecordBatch
fn evaluate(&self, batch: &RecordBatch) -> Result<ColumnarValue>;
```
```rust
pub enum ColumnarValue {
/// Array of values
Array(ArrayRef),
/// A single value
Scalar(ScalarValue),
}
```
cause of it return ColumnarValue, we can not return result as a table, am i right?
Should i implement a `TablePhysicalExpr`
using
```rust
fn evaluate(&self, batch: &RecordBatch) -> Result<Vec<ColumnarValue>>;
```
--
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