Tvf 15575 new#11
Conversation
Changes adapted from trino/PR#11336 Original commit: 2e00c8e64c32d6fdd813999b2e04b3b3415235c8 Author: kasiafi Modifications were made to adapt to Presto including: Addition of KEEP in the parser. Adjustment of the TestSqlParser.java to apply to Presto concepts. Switch from Trino's DataType based datatypes to Presto's String based datatypes. Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Changes adapted from trino/PR#11336 Original commit: 395fd91c6480a993241eeabd9599873d0d05b24b Author: kasiafi Modifications were made to adapt to Presto including: Removal of ConnectorExpression. Will be required in a future commit. Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Changes adapted from trino/PR#11336 Original commit: e69a052e570718ca568114e61644946feab4383e Author: kasiafi Modifications were made to adapt to Presto including: Removal of the StatementAnalyzerFacotry calls. Add TransactionManager to all StatementAnalyzer constructor calls. Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Changes adapted from trino/PR#11336 Original commit: 493f639a9daa5e6aaadbb4364587196cb5240fc2 Author: kasiafi Modifications were made to adapt to Presto including: Addition of TableFunctionRegistry into FunctionAndTypeManager Removal of FunctionResolver Addition of toPath to TableFunctionRegistry Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Changes adapted from trino/PR#11336 Original commit: 9e8d51ad45f57267f5f7fa6bf8e8c4ec56103dda Author: kasiafi Modifications were made to adapt to Presto including: Removal of Node Location from TrinoException Added new SemanticErrorCodes Changed Void context to SqlPlannerContext in RelationPlanner.java Add newUnqualified to Field class with Presto specification Add getCanonicalValue to Identifier.java Co-authored-by: Pratik Joseph Dabre <pdabre12@gmail.com> Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Changes adapted from trino/PR#11336 Original commit: d4c73389bbdb6b48c24a0969b259286b05a99ade Author: kasiafi Modifications were made to adapt to Presto including: Change CatalogName to ConnectorId Modified and removed outputSymbols -> VariableReferenceExpression Following visitTable example, created and used VariableReferenceExpression List Builder. TableFunctionNode extends InternalPlanNode instead of PlanNode. Circular dependency and following other Node classes. Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Changes adapted from trino/PR#11336 Original commit: 565700985baff0c4b29fdb1e3e26139a29318b9e Author: kasiafi Modifications were made to adapt to Presto including: Add applyTableFunction to all implementations of Metadata Change CatalogName to ConnectorId Add empty ConnectorTableLayoutHandle to TableHandle in MetadataManger::applyTableFunction Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Changes adapted from trino/PR#11336 Original commit: ec8b9fd2b2cc9c8bc78c0ca1317dc34fcf2c48c7 Author: kasiafi Modifications were made to adapt to Presto including: Change Symbol to VariableReferenceExpression Add additional arguments to TableScanNode calls Removal of PlannerContext and replaced with Metadata Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Preparatory commit for supporting table functions in JDBC connectors Changes adapted from trino/PR#11336 Original commit: b4d4b5102e878b7e38e13c0440432543a18f913e Author: kasiafi Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Changes adapted from trino/PR#12350 Original commit: 998315075343beecef962657b8cbf440d53cc13b Author: kasiafi Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Changes adapted from trino/PR#12407 Original commit: 712b8e98ff8a726f95295ac539159fc532628273 Original commit: 131dc44af97b31a2fa8115028d98d06671641bfa Author: kasiafi Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Changes adapted from trino/PR#12476 Original commit: 0da095e14b0855f89af3c4f254a5a60280fc7170 Author: kasiafi Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Changes adapted from trino/PR#12531 Original commit: 18bb60262cb0850cf839c2b20b434344921f5122 Original commit: 4a7d72afb64f93a9748a4c6b4defc2d42bbae000 Author: kasiafi Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Changes adapted from trino/PR#12813 Original commit: 5310671f80291394b12ba2ea746e4e60051aaff4 Author: kasiafi Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Changes adapted from trino/PR#12910 Original commit: f0508a7ab420449c6e2960ecf1d0a8d7058242da Author: kasiafi Modifications were made to adapt to Presto including: Addition of test case under TestJdbcDistributedQueries.java. Removal of Trino JDBC test cases.
Changes adapted from trino/PR#12951 Original commit: b602e4e0065d00a2c9b1f645cf7ed2905bdd6078 Original commit: 98fc1ee8b29fca86f2a1b3abe4989524940333a6 Original commit: 0cec709ae1b6c707ca4810cdef8a852253167ab1 Author: kasiafi Modifications were made to adapt to Presto including: Addition of other Trino Mock testing classes. Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
865472b to
b1cf085
Compare
Co-authored-by: Pratik Joseph Dabre <pdabre12@gmail.com> Co-authored-by: Xin Zhang <desertsxin@gmail.com>
Changes adapted from trino/PR#13106 Original commit: d0e2470c59f0de4be1e6320f1350b8806a72c548 Modifications were made to adapt to Presto including: Currently not formatting the arguments as we do not have a printer for Scalar Arguments.
Changes adapted from trino/PR#13602 Original commit: 21695a1dfb33d5cb8bb195397d769222da5a6345 Author: kasiafi Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Changes adapted from trino/PR#13602 Original commit: 8be4a486a525056ef6b361618280ae0185d7211b Author: kasiafi Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
…uments of table functions Changes adapted from trino/PR#13649 Changes adapted from trino/PR#13602 Original commit: a63cc9c429cea7849cf723598719812cc8e5636c Original commit: 31b2b79751944eed42eaa4538a52dbf65c0399a6 Author: kasiafi Modifications were made to adapt to Presto including: Updated tests to match Presto format. Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Changes adapted from trino/PR#13602 Original commit: a93597ff72d98d577b32f5da6ef562ec85a7aad6 Author: kasiafi Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Changes adapted from trino/PR#13602 Original commit: 21acef5d028565b919e3eae2df9784fbc2317ae9 Author: kasiafi Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Prune when empty is enforced for a table argument with row semantics. For a table argument with set semantocs, keep when empty is the default, and it can be changed to prune when empty. Changes adapted from trino/PR#13602 Original commit: 9771edb626ea47f2333988178107c7a2dc46ec6b Author: kasiafi Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
Changes adapted from trino/PR#13602 Original commit: 15664c845f4958ecffbb0dca2596226ee899c12e Author: kasiafi Co-authored-by: kasiafi <30203062+kasiafi@users.noreply.github.com>
|
The passThroughSpecification is listing the orderkey as the partitioningColumn. However it should be orderstatus as the PartitioningColumn |
|
This is definitely not right. I put a breakpoint here but the translator is already incorrect. @xin-zhang2 Please continue from here. Thanks! |
|
I think I got it. The issue was that we were using the first column as the translation when adding it into the translator. So it was always orderkey. |
|
Fixed. |
Temporarily remove the checkState in WindowFilterPushDown
Before optimization The inputs provided from the Source Project node |
|
Marker variables are already set to these values at the time of the map call from UnaliasSymbolReferences(visitTableFunctionProcessor) expr_0 is assigned to expr at Project Node. We need to investigate where this double project node was turned into the window node with joins. I think when that occurs, we are losing track of expr_0 Post join, at least from the Project Node, expr_0 is still there and being assigned. Output variables from the join are |
|
So the issue is here, when we convert to an exchange. |
|
field -> field and expr0 is gone. I think we need to modify the maker variables of TableFuncitonProcessorNode when we make this optimization. By the time we get to Unalias, it has already occurred. So we can't do it then, as expr(0) context has already disappeared. |
|
Fixed the makerVariables issue. |
|
Was busy with meetings almost the whole day. Did a little investigating. Noticed that the source types are much larger in presto than in Trino. In Presto source types is 47 while in Trino its only 2. Expected positions is the same. This however seems to make the Presto pagesIndex at the start, much larger. I'm not sure if this is the cause of the issue however. 92,432 vs 324496. Increasing the query memory limit did not help. Either |
|
Current plan |
|
Trino Explain |
3d0016e to
49985fa
Compare
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: