Support transaction in FunctionNamespaceManager#13484
Merged
rongrong merged 13 commits intoprestodb:masterfrom Oct 10, 2019
Merged
Support transaction in FunctionNamespaceManager#13484rongrong merged 13 commits intoprestodb:masterfrom
rongrong merged 13 commits intoprestodb:masterfrom
Conversation
eb14b6f to
d536046
Compare
caithagoras
commented
Oct 1, 2019
presto-verifier/src/main/java/com/facebook/presto/verifier/framework/Column.java
Outdated
Show resolved
Hide resolved
c28e4f7 to
384555b
Compare
41d4575 to
6e23c89
Compare
Contributor
Author
|
Test failures have been addressed. |
Contributor
Author
|
Updates since last comment:
|
Contributor
Author
|
@rongrong This PR is ready for review |
rongrong
reviewed
Oct 9, 2019
Contributor
rongrong
left a comment
There was a problem hiding this comment.
Up to Introduce InMemoryFunctionNamespaceManager for testing purpose looks good with nits.
presto-main/src/main/java/com/facebook/presto/metadata/BuiltInFunctionNamespaceManager.java
Outdated
Show resolved
Hide resolved
...to-geospatial/src/test/java/com/facebook/presto/plugin/geospatial/TestBingTileFunctions.java
Outdated
Show resolved
Hide resolved
...to-sql-function/src/main/java/com/facebook/presto/sqlfunction/SqlInvokedRegularFunction.java
Outdated
Show resolved
Hide resolved
...-function/src/main/java/com/facebook/presto/sqlfunction/SqlInvokedRegularFunctionHandle.java
Outdated
Show resolved
Hide resolved
Also, fix ApplicableFunction#toString
Also update the parameter type.
FunctionNamespaceManager should not be aware that the collection of functions returned by the method is used as candidates for function resolution purpose.
rongrong
reviewed
Oct 9, 2019
presto-spi/src/main/java/com/facebook/presto/spi/function/FunctionNamespaceManager.java
Outdated
Show resolved
Hide resolved
presto-spi/src/main/java/com/facebook/presto/spi/function/FunctionNamespaceManager.java
Outdated
Show resolved
Hide resolved
FunctionNamespaceManager now supports the transaciton-like operations, including beginTransaction, commit, and rollback. AbstractTransactionalFunctionNamespaceManager gives one such implementation. TransactionManager manages the mapping from TransactionId to FunctionNamespaceTransactionHandle, while the FunctionNamespaceManager implementation manages its own transaction. The currernt transaction support guarantees the consistency (read consistency) for the transaction-aware method #getFunctions.
AbstractSqlInvokedFunctionNamespaceManager supports caching in addition to transaction. Fetched functions and function metadata are both cached to reduce the latency of lookups and the frequency of the external API calls.
Contributor
Author
|
@rongrong TODOs added. |
rongrong
approved these changes
Oct 10, 2019
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Highlights of the PR:
InMemoryFunctionNamespaceManagerfor testing purpose.createFunction.SqlInvokedRegularFunctionFunctionNamespaceManager.#getFunctions.FunctionNamespaceManager<SqlInvokedRegularFunction>#getFunctionsand#getFunctionMetadata