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

Add more tests for operator-executed table functions #16057

Closed

Conversation

kasiafi
Copy link
Member

@kasiafi kasiafi commented Feb 10, 2023

Based on #15575 (operator) and #16012 (optimizations).
Adds more tests involving the execution by operator of table functions optimized by the column pruning rules.

No docs or release notes needed.

@cla-bot cla-bot bot added the cla-signed label Feb 10, 2023
@kasiafi kasiafi force-pushed the 455TFOperatorTestWithOptimizations branch from 4d056c9 to 4db6d64 Compare February 10, 2023 10:10
kasiafi added 16 commits March 3, 2023 13:16
TableFunctionProcessorNode has a mapping from source symbols
to marker symbols. When the plan is optimized with UnaliasSymbolReferences,
some source symbols, and their corresponding marker symbols,
might be recognized as semantically identical, and rewritten
to the same symbols.
Before this change, building the symbol-to-marker map failed
in such case, because the used map collector could not resolve
conflicts.
After this change, duplicate entries are accepted provided that
equal keys have eqal values (markers) assigned.
TableFunctionProcessorNode specifies pass-through symbols for all sources.
When the plan is optimized with UnaliasSymbolReferences, some pass-through
symbols from one or more sources might be recognized as semantically identical,
and rewritten to the same symbol.
Before this change, all the rewritten symbols remained in the pass-through lists.
If duplicates occurred, it caused failure in the LocalExecutionPlanner while
computing the output mapping for the TableFunctionProcessorNode.
Adds support for table functions that have table inputs.
Execution by operator for table functions without sources
is not yet implemented.

If the input is empty, and it does not have the
KEEP WHEN EMPTY property, the function is not executed,
and empty result is returned.

If the input is empty, and it has the KEEP WHEN EMPTY
property, the function is executed upon the EmptyTableFunctionPartition
It is ensured that the function with empty input is executed once per node,
and that there is single node distribution in case of the KEEP WHEN EMPTY
property.
Rename the existing TableFunctionProcessor to TableFunctionDataProcessor,
and introduce another interface for processing splits.
This change adds the LeafTableFunctionOperator for processing
table functions that do not take input (without table arguments).
Splits are supported.
Add more detailed check for TableFunctionProcessorNode.passThroughSpecifications
in TableFunctionProcessorMatcher.
Add check for TableFunctionProcessorNode.requiredSymbols
in TableFunctionProcessorMatcher.
Add check for TableFunctionProcessorNode.hashSymbol
in TableFunctionProcessorMatcher.
Adds an optimizer rule to remove TableFunctionProcessorNode with
source being an empty relation, based on the "prune when empty"
property.
@kasiafi kasiafi force-pushed the 455TFOperatorTestWithOptimizations branch from 4db6d64 to 07796f3 Compare March 3, 2023 13:17
@kasiafi
Copy link
Member Author

kasiafi commented Mar 3, 2023

These changes were moved to #16012. I'm closing this PR.

@kasiafi kasiafi closed this Mar 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

1 participant