-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Fix table function execution without partitioning #21378
base: master
Are you sure you want to change the base?
Conversation
3a50d3b
to
cb2452b
Compare
passThroughSpecifications, | ||
processEmptyInput)) | ||
.flatMap(TableFunctionPartition::toOutputPages); | ||
if (partitionChannels.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want to to check if the List
is empty as well? I tested locally on some custom table functions by cherry-picking this commit and ran into this case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
my understanding is that empty list is legitimate, and requires global aggregation (one partition)
cb2452b
to
2c28e2f
Compare
just rebased, no other changes |
Previously, when table function did not declare partitioning, it would be globally distributed, but on a worker node it would run single-threaded and first buffer all data in memory, like a one big WINDOW. After the change, the local execution processes input pages in a streaming fashion. This commit also fixes property derivations for a case where table function is partitioned on empty list of symbols (global grouping).
2c28e2f
to
40ba52f
Compare
( rebased, no other changes ) |
draft -- this implementation has suboptimal lifecycle for |
Any traction on this? We have been running a fork with these changes and would love for it to be in trino proper. |
@mosabua I think we can close - I would be opening a new PR for this. |
Previously, when table function did not declare partitioning, it would be globally distributed, but on a worker node it would run single-threaded and first buffer all data in memory, like a one big WINDOW. After the change, the local execution processes input pages in a streaming fashion.
This commit also fixes property derivations for a case where table function is partitioned on empty list of symbols (global grouping).
Fixes #20398