Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show window frame info in physical plan #4509

Closed
Tracked by #542
Ted-Jiang opened this issue Dec 5, 2022 · 0 comments · Fixed by #4508
Closed
Tracked by #542

Show window frame info in physical plan #4509

Ted-Jiang opened this issue Dec 5, 2022 · 0 comments · Fixed by #4508
Labels
enhancement New feature or request

Comments

@Ted-Jiang
Copy link
Member

Ted-Jiang commented Dec 5, 2022

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

When explain sql with window func, not show frame info in physical plan

explain SELECT s_suppkey, s_nationkey, s_acctbal, (sum(s_acctbal) over (
                                                                   ORDER BY s_acctbal DESC ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING)) wr
   FROM supplier

limit 10;
+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type     | plan                                                                                                                                                                                                                             |
+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| logical_plan  | Projection: supplier.s_suppkey, supplier.s_nationkey, supplier.s_acctbal, SUM(supplier.s_acctbal) ORDER BY [supplier.s_acctbal DESC NULLS FIRST] ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING AS wr                                  |
|               |   Limit: skip=0, fetch=10                                                                                                                                                                                                        |
|               |     WindowAggr: windowExpr=[[SUM(supplier.s_acctbal) ORDER BY [supplier.s_acctbal DESC NULLS FIRST] ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING]]                                                                                   |
|               |       TableScan: supplier projection=[s_suppkey, s_nationkey, s_acctbal]                                                                                                                                                         |
| physical_plan | ProjectionExec: expr=[s_suppkey@1 as s_suppkey, s_nationkey@2 as s_nationkey, s_acctbal@3 as s_acctbal, SUM(supplier.s_acctbal) ORDER BY [supplier.s_acctbal DESC NULLS FIRST] ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING@0 as wr] |
|               |   GlobalLimitExec: skip=0, fetch=10                                                                                                                                                                                              |
|               |     WindowAggExec: wdw=[SUM(supplier.s_acctbal): Ok(Field { name: "SUM(supplier.s_acctbal)", data_type: Float64, nullable: true, dict_id: 0, dict_is_ordered: false, metadata: None })]                                          |
|               |       SortExec: [s_acctbal@2 DESC]                                                                                                                                                                                               |
|               |         ParquetExec: limit=None, partitions=[Users/yangjiang/test-data/tpch-1g-oneFile/supplier/part-00000-e23491fe-e659-4768-ab6d-cd32c7aff311-c000.snappy.parquet], projection=[s_suppkey, s_nationkey, s_acctbal]             |
|               |                                                                                                                                                                                                                                  |
+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
2 rows in set. Query took 0.192 seconds.

Describe the solution you'd like
A clear and concise description of what you want to happen.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant