Conversation
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>
|
Issue: Fix: |
|
Issue: Fix: We don't have a getRequiredCatalogHandle. So we are calling, getOptionalCatalogMetadata. We then use this metadata to get the connector ID. |
|
Issue: ValidateDependenciesChecker is returning In Trino, we use a TypeValidator instead of the ValidateDependenciesChecker. This TypeValidator's Visitor is a SimplePlanVisitor while the Presto ValidateDependenciesChecker Visitor is a PlanChecker.Checker. It also overwrites the visitPlan with one that is not yet implemented. Brought the visitPlan from SimplePlanVisitor into ValidateDependenciesChecker Visitor. There are currently no sources for the PlanNode at this step. NOTE: |
|
Issue: Fixed this and previous one via overriding visitTableFunction |
|
Modified MockConnector with default layouts instead of not implemented. This is because Presto pushes down predicates on visitTableScan as well as visitFilter, while Trino only does it on visitFilter. |
|
Current issue, metadata.getTableMetadata is returning null. Fix. |
|
Current issue, This is caused by MockConnectorFactory using the TpchSplitManager. In Trino they use a different split manager |
This is caused by the previous change. Updated to From TestDriver's MockSplit |
|
Current issue. Issue is caused by the HandleResolver not finding a MockConnectorColumnHandle resolver. This is because we were using a TpchColumnHandle resolver. Created MockHandleResolver class. TODO: Future, we may need to separate out our Mock classes into our own as it seems like all of the usages of TPCH need to be removed from the Mock. I'm guessing that the Mock classes in Presto have diverged for a different use case than Trino's. So we will probably need our own. |
e633ced to
d85e120
Compare
|
Current issue Currently attempting Adding MockConnectorTransactionHandle from Trino. This pushes more towards us having a complete separate Mock classes. Stopping here for today. |
|
Current issue Modified MockHandleResolver to use MockConnectorTransactionHandle.class |
Changed getTable to use TestingHandle.class Also changed SplitClass |
Currently trying to figure out what RecordSetProvider that trino uses for its mock tests. |
|
Refactored. Current latest issue. |
|
Replaced Testing handle with MockTableLayout Handle. Now getting issues back at the planner stage. |
|
@mohsaka The cause of the issue: while new ConnectorTableLayout(mock) will re-set predicate in the layout to TupleDomain.all() due toWhen We can pass This change will get the |
|
@xin-zhang2 Nice, we have our first working test. Will push in that change and we can now work on the one with arguments. |
Co-authored-by: Pratik Joseph Dabre <pdabre12@gmail.com> Co-authored-by: Xin Zhang <desertsxin@gmail.com>
|
First test is now clean, now going to the table function with arguments. The Layouts will have to be changed once we start moving into the statistics and partitioning. |
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.
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: