Skip to content
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

Support MySQL-based FunctionNamespaceManager #13972

Merged
merged 6 commits into from
Feb 8, 2020

Conversation

caithagoras
Copy link
Contributor

@caithagoras caithagoras commented Jan 16, 2020

== RELEASE NOTES ==

General Changes
* Add a MySQL-based function namespace manager implementation that supports creating, altering, and dropping SQL functions. (:doc:`/admin/function-namespace-managers`)

@caithagoras caithagoras added the wip Work In Progress label Jan 16, 2020
@caithagoras caithagoras changed the title [WIP] Support MySql-backed FunctionNamespaceManager [WIP] Support MySql-based FunctionNamespaceManager Jan 16, 2020
@caithagoras caithagoras changed the title [WIP] Support MySql-based FunctionNamespaceManager [WIP] Support MySQL-based FunctionNamespaceManager Jan 16, 2020
@caithagoras caithagoras force-pushed the s1 branch 4 times, most recently from cb46ab3 to b6d4803 Compare January 16, 2020 03:15
@caithagoras caithagoras changed the title [WIP] Support MySQL-based FunctionNamespaceManager Support MySQL-based FunctionNamespaceManager Jan 16, 2020
@caithagoras caithagoras requested a review from rongrong January 16, 2020 03:15
@caithagoras caithagoras added sql-function and removed wip Work In Progress labels Jan 16, 2020
@caithagoras caithagoras force-pushed the s1 branch 2 times, most recently from 7cc9ff8 to 6b887ea Compare January 16, 2020 19:23
@rongrong
Copy link
Contributor

A very high level comment: I see that you are renaming the module presto-sql-function to presto-function-namespace-managers and adding the function namespace manager directly to this module. If you are planning to do this, you probably want to introduce subdirectories to organize the code rather than keep them all under .../sql-function.

@caithagoras
Copy link
Contributor Author

caithagoras commented Jan 21, 2020

@rongrong Renamed package com.facebook.presto.sqlfunction to com.facebook.presto.functionNamespace

@caithagoras caithagoras force-pushed the s1 branch 4 times, most recently from 459927a to 9b97d8d Compare January 23, 2020 20:29
@caithagoras caithagoras added the wip Work In Progress label Jan 23, 2020
@caithagoras caithagoras force-pushed the s1 branch 2 times, most recently from 4ae4d07 to ad2a9a6 Compare January 24, 2020 01:05
@caithagoras
Copy link
Contributor Author

caithagoras commented Jan 24, 2020

@rongrong Ready for another pass.
Made a few improvements in the 3rd commit and will merge into the 2nd commit before merging.

  • Use annotation to pre-define all <function-namespaces-table> and <sql-functions-table> without requiring String to be passed as parameters.
  • Use module to create FunctionNamespaceManager in test, so that the module is tested as well.
  • Update some config names and default values.

@caithagoras caithagoras force-pushed the s1 branch 4 times, most recently from a57e47d to 9740926 Compare January 24, 2020 21:53
@caithagoras caithagoras force-pushed the s1 branch 3 times, most recently from b5816c3 to 1ff467c Compare February 7, 2020 21:46
@caithagoras
Copy link
Contributor Author

All comments addressed. Thanks for the feedback!

@caithagoras caithagoras force-pushed the s1 branch 4 times, most recently from fba7572 to 5e34041 Compare February 7, 2020 22:21

Function namespace managers support storing and retrieving SQL
functions, allowing Presto engine to perform actions such as creating,
altering, deleting, and executing functions.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"executing functions" is not new and it's not something "allowed" by function namespace managers.

Copy link
Contributor Author

@caithagoras caithagoras Feb 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I intend to say "resolving functions"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

resolving function is also not introduced by function namespace manager though.

@caithagoras caithagoras force-pushed the s1 branch 3 times, most recently from 975a5c9 to 177bd36 Compare February 7, 2020 22:59
Copy link
Contributor

@sachdevs sachdevs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The function namespace part is very understandable. Looks good. Couple of minor suggested changes but overall seems very clear.

name. A function is uniquely identified by its qualified function name
and parameter type list.

Each instance of function namespace manager binds to a catalog name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

of a function namespace manager

Copy link
Contributor Author

@caithagoras caithagoras Feb 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When we're saying a function namespace manager, we're referencing an instance, not a type of function namespace manager. So, maybe, I should just say each Each function namespace manager....

presto-docs/src/main/sphinx/sql/create-function.rst Outdated Show resolved Hide resolved
@caithagoras caithagoras force-pushed the s1 branch 5 times, most recently from e754e1f to 48e5619 Compare February 7, 2020 23:30
- Add documentation for CREATE FUNCTION, ALTER FUNCTION, and DROP
  FUNCTION statements.
- Add documentation for Function Namespace Managers configuration.
Copy link
Contributor

@rongrong rongrong left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the contribution!

@rongrong
Copy link
Contributor

rongrong commented Feb 7, 2020

For the release note, I'd mention "function namespace manager" and refer to the documentation added.

@caithagoras caithagoras merged commit 44c044a into prestodb:master Feb 8, 2020
@caithagoras caithagoras deleted the s1 branch February 8, 2020 03:47
@caithagoras caithagoras mentioned this pull request Feb 20, 2020
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants