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

貢獻指南

這個儲存庫沒有索引到貢獻指南

研究方向

先檢視目前的 datafusion.expr 匯出,尤其是 expr_internal.Limit 的重新匯出,然後閱讀 PR #1674 和 issue #1673,以了解其背後的使用情境。根據現有的 Expression 型別定義 wrapper 的範圍;當預期的 wrapper 公開所要求的運算式資料,包括 Limit.fetch 和 Limit.skip 時,工作即告完成。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
python
領域
api
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
冷清
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。