Window function dependencies not in source plan output
See original GitHub issuewith t1 as (
select orderkey, totalprice
from tpch.tiny.orders
),
t2 as (
select orderkey, totalprice, sum(totalprice) over () x
from t1
),
t3 as (
select orderkey, max(x) over()
from t2
)
select * from t3
java.lang.IllegalArgumentException: Invalid node. Window function dependencies ([sum]) not in source plan output ([orderkey])
at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)
at com.facebook.presto.sql.planner.sanity.ValidateDependenciesChecker.checkDependencies(ValidateDependenciesChecker.java:645)
at com.facebook.presto.sql.planner.sanity.ValidateDependenciesChecker.access$100(ValidateDependenciesChecker.java:80)
at com.facebook.presto.sql.planner.sanity.ValidateDependenciesChecker$Visitor.visitWindow(ValidateDependenciesChecker.java:187)
at com.facebook.presto.sql.planner.sanity.ValidateDependenciesChecker$Visitor.visitWindow(ValidateDependenciesChecker.java:94)
at com.facebook.presto.sql.planner.plan.WindowNode.accept(WindowNode.java:154)
at com.facebook.presto.sql.planner.sanity.ValidateDependenciesChecker$Visitor.visitOutput(ValidateDependenciesChecker.java:303)
at com.facebook.presto.sql.planner.sanity.ValidateDependenciesChecker$Visitor.visitOutput(ValidateDependenciesChecker.java:94)
at com.facebook.presto.sql.planner.plan.OutputNode.accept(OutputNode.java:82)
at com.facebook.presto.sql.planner.sanity.ValidateDependenciesChecker.validate(ValidateDependenciesChecker.java:91)
at com.facebook.presto.sql.planner.sanity.ValidateDependenciesChecker.validate(ValidateDependenciesChecker.java:86)
at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.lambda$validate$0(PlanSanityChecker.java:44)
at java.lang.Iterable.forEach(Iterable.java:75)
at com.facebook.presto.sql.planner.sanity.PlanSanityChecker.validate(PlanSanityChecker.java:44)
at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:127)
at com.facebook.presto.sql.planner.LogicalPlanner.plan(LogicalPlanner.java:111)
at com.facebook.presto.execution.SqlQueryExecution.doAnalyzeQuery(SqlQueryExecution.java:297)
at com.facebook.presto.execution.SqlQueryExecution.analyzeQuery(SqlQueryExecution.java:276)
at com.facebook.presto.execution.SqlQueryExecution.start(SqlQueryExecution.java:234)
at com.facebook.presto.execution.resourceGroups.InternalResourceGroup.lambda$startInBackground$1(InternalResourceGroup.java:478)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Issue Analytics
- State:
- Created 7 years ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
io.prestosql.sql.planner.plan.WindowNode$Function ... - Tabnine
ifPresent(referencedInputs::add); windowFunction.getFrame(). ... Window function dependencies (%s) not in source plan output (%s)", dependencies, node.
Read more >How to use Window functions in SQL Server - SQLShack
This article explains the use of Aggregate, Raking and Value Windows Functions in SQL Server.
Read more >Window function calls | BigQuery - Google Cloud
A window function, also known as an analytic function, computes values over a group of rows and returns a single result for each...
Read more >Use the Object Dependencies pane to see how objects relate
Before you delete the query, you should find out if any of the other objects in the database, such as a form or...
Read more >Command: plan | Terraform - HashiCorp Developer
The plan command alone does not actually carry out the proposed changes You ... to resource instances or to root module output values,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’ll look into it. Keep me assigned.
@cawallin Updated with a reproduction