Implement table function source#6#8
Conversation
|
Currently on updating the TableFunctionMatcher for commit Expected Trino Output from here It seems like SymbolReference in Trino is == VariableReferenceExpression. |
37bf5dc to
542b093
Compare
The new field allows the table function to declare during analysis which columns from the input tables are necessary to execute the function. The required columns can be then validated by the analyzer. This declaration can be also used by the optimizer to prune any input columns that are not used by the table function. Changes adapted from trino/PR#15256 Original commit: c77995bde37f79c44c9d74336f57b32a2b142570 Author: kasiafi Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Changes adapted from trino/PR#15256 Original commit: 0aaab67639b07cddc1ac7f3af6cc54af6a4de4c0 Author: kasiafi Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Change the builder for TableArgumentSpecification so that there is no default for the empty behavior. Changes adapted from trino/PR#14566 Original commit: 6e95fb186fc3edc7fd6a5bdc385e68f8accff11e Author: kasiafi Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
…tput If a table function has multiple partitioned inputs, they might be co-partitioned. Co-partitioning might require coercing of the corresponding partitioning columns to common supertype. Additionally, each partitioning source column should be produced on table function's output in its original (uncoerced) form. Before this change, the coerced columns were incorrectly passed to output. After this change, the uncoerced columns are preserved for output independently from the Specification, which is planned with regard to the required co-partitioning coercions. Changes adapted from trino/PR#14566 Original commit: 05535286323470132dd5df0e88ee1e6aa49f4c34 Author: kasiafi Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Adds the SchemaFunctionName, which can act as a unique identifier of the function for a given catalog. Changes adapted from trino/PR#14566 Original commit: cf0bd23dc457ba0cf6483e086cc342b071c32efb Author: kasiafi Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
the necessary pass-through information for a table function's source includes: - whether the source was declared as pass-through - an ordered list of pass-through columns - for each column, information whether it is a partitioning column Changes adapted from trino/PR#14566 Original commit: 795f46d93e3039c4872cfd2be842aeaa306f39f8 Author: kasiafi Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
When the ordering scheme is mapped, some symbols might be removed due to de-duplication. If de-duplication happens within the pre-sorted prefix, the length of the prefix should be updated. This causes no issues currently, since UnaliasSymbolReferences, and so the SymbolMapper, is never called after AddLocalExchanges, where the pre-sorted symbols are determined. Changes adapted from trino/PR#14566 Original commit: af620aaf426745e47f4a4d458cbc6b71d2684ddb Author: kasiafi Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Changes adapted from trino/PR#14566 Original commit: 96be405333dd55ccd789aa5133799c492cf06dcf Author: kasiafi
…ingNode Changes adapted from trino/PR#14566 Original commit: 5d5eaf8e6b5737758589247fc106867482fb54d3 Author: kasiafi
Support arbitrary number of sources (including no sources), involving row and set semantics, prune/keep when empty properties, and co-partitioning. Changes adapted from trino/PR#14566 Original commit: 68bbbca9cc32505badc343adab56f59a685a7187 Author: kasiafi
|
Currently bringing in the last commit. Working on the ImplementTableFunctionSource file. Quite a large one. Feel free to pick it up if you fix the testing. |
5d8a597 to
9b700e7
Compare
|
For one of the usages, we are able to use coalesce as we are passing in VariableReferenceExpressions. The others do not and are forms of Expressions. I looked into SpecialFormExpressions but those require VariableReferenceExpressions as well. Also attempted to bring in rowExpression from QueryPlanner/RelationPlanner, however we are missing a few of the objects required. They would need to be passed in from PlanOptimizers. But could not find a shared class between them to pass them all the way through. |
|
Current issue Mismatch on ordering Type. Symbol Alias differences Trino LATEST Presto Remembered Xin hit a similar issue. Found function |
Description
Motivation and Context
Impact
Test Plan
Contributor checklist
Release Notes
Please follow release notes guidelines and fill in the release notes below.
If release note is NOT required, use: