-
Notifications
You must be signed in to change notification settings - Fork 62
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
Removes unused SPI APIs and makes connector instantiate catalogs #1588
Conversation
CROSS-ENGINE Conformance Report ❌
Testing DetailsResult Details
Now Failing Tests ❌The following 2 test(s) were previously PASSING in BASE but are now FAILING in TARGET: Click here to see
Now Passing Tests535 test(s) were previously failing in BASE (LEGACY-F1748FA) but now pass in TARGET (EVAL-F1748FA). Before merging, confirm they are intended to pass. The complete list can be found in GitHub CI summary, either from Step Summary or in the Artifact. CROSS-COMMIT-LEGACY Conformance Report ✅
Testing DetailsResult Details
Now Passing TestsThe following 1 test(s) were previously FAILING in BASE but are now PASSING in TARGET. Before merging, confirm they are intended to pass: Click here to see
CROSS-COMMIT-EVAL Conformance Report ✅
Testing DetailsResult Details
|
* @param name Catalog name | ||
* @return | ||
*/ | ||
public fun getCatalog(name: String): Catalog |
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.
Will this ever be used?
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.
It's the same as 0.14 with the null config. I've just added the override manually.
public fun create(catalogName: String, config: StructElement? = null): Connector
* @param context Context is an arbitrary object | ||
* @return | ||
*/ | ||
public fun getCatalog(name: String, context: Context): Catalog |
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.
Given that a name is carried by the Catalog
itself, it might not be necessary to pass it here (or not necessary to keep it in the Catalog
). It may present the opportunity for mismatching names.
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.
Think of this being looking up a catalog implementation (or instantiating if it does not exist). I see this as no different than the Catalog's getTable(name: Name): Table
which also presents the opportunity for mismatching names.
Now .. that would be a bad implementation which is kind of like returning the wrong table given the name. We can't stop a customer from implementing something incorrect.
Relevant Issues
#1496
Description
This PR is a cleanup of extra and unused SPI APIs, and it is the final modifications to the connector/catalog components of the SPI. We have effectively moved from Trino's model of plugins+connector to a "catalog" interface like Iceberg and Calcite.
Other Information
and Code Style Guidelines? YES
License Information
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.