apache / apache/datafusion-python

Add wrapper classes for Expression types

未关闭
#1,681 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
enhancement
主要语言
Python
星标
604
派生
174
平均合并
1 天 7 小时
30 天内合并 PR
4

描述

**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**

As part of the discussion in https://github.com/apache/datafusion-python/pull/1674 we found a user wants access to some of the elements within an expression. In this case, `Limit`. If there is a growing base of users who want to use `datafusion-python` to do things such as analyzing the plans and using the data in them, then we should probably add wrapper classes for each of the Expressions.

**Describe the solution you'd like**

Right now we have the expressions like `Limit` available in `datafusion.expr` reexported like

```python
Limit = expr_internal.Limit
```

Instead we could have a `datafusion.expr` module that contains

```python
class Limit(Expr):
```

which has attributes to get `fetch` and `skip`.

**Describe alternatives you've considered**

We could leave as is and continue to expose data members as requested.

**Additional context**

This is a follow on to https://github.com/apache/datafusion-python/issues/1673

贡献指南

这个仓库没有索引到贡献指南

调研方向

Start by reviewing the current datafusion.expr exports, especially the expr_internal.Limit re-export, then read PR #1674 and issue #1673 for the motivating use case. Define the wrapper scope from the existing Expression types; the work is done when the intended wrappers expose the requested expression data, including Limit.fetch and Limit.skip.

由索引模型根据 Issue 内容生成。

评估

技术栈
python
领域
api
Issue 类型
功能
难度
5/5
预计耗时
一周以上
活跃度
冷清
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。