-
Notifications
You must be signed in to change notification settings - Fork 13.8k
[FLINK-14301][doc] add documentation for functions categories and new function resolution orders #10110
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
Conversation
|
Thanks a lot for your contribution to the Apache Flink project. I'm the @flinkbot. I help the community Automated ChecksLast check on commit c27cac4 (Wed Dec 04 15:07:08 UTC 2019) ✅no warnings Mention the bot in a comment to re-run the automated checks. Review Progress
Please see the Pull Request Review Guide for a full explanation of the review process. DetailsThe Bot is tracking the review progress through labels. Labels are applied according to the order of the review items. For consensus, approval by a Flink committer of PMC member is required Bot commandsThe @flinkbot bot supports the following commands:
|
|
docs of how to register and manipulate such functions will be added later, as ddl and apis are still moving around and not finalized yet |
|
@flinkbot attention @fhueske @sjwiesman |
sjwiesman
left a comment
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.
I've made a first pass of the docs.
Besides my inline comments, please change the parent nav on the pages you moved to be 'table_functions'.
docs/dev/table/functions/index.md
Outdated
| nav-id: table_functions | ||
| nav-parent_id: tableapi | ||
| nav-pos: 116 | ||
| is_beta: true |
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.
Why are functions beta?
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.
removed
|
|
||
| There are two dimensions to classify functions in Flink. | ||
|
|
||
| One dimension is system (or built-in) functions v.s. catalog functions. System functions have no namespace and can be |
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.
You say system here but named the page built in. Let's just pick one and stick with it.
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.
let's use "system"
| Types of Functions | ||
| ------------------ | ||
|
|
||
| There are two dimensions to classify functions in Flink. | ||
|
|
||
| One dimension is system (or built-in) functions v.s. catalog functions. System functions have no namespace and can be | ||
| referenced with just their names. Catalog functions belong to a catalog and database therefore they have catalog and database | ||
| namespaces, they can be referenced by either fully/partially qualified name (`catalog.db.func` or `db.func`) or just the | ||
| function name. | ||
|
|
||
| The other dimension is temporary functions v.s. persistent functions. Temporary functions are volatile and only live up to | ||
| lifespan of a session, they are always created by users. Persistent functions live across lifespan of sessions, they are either | ||
| provided by the system or persisted in catalogs. | ||
|
|
||
| The two dimensions give Flink users 4 categories of functions: | ||
|
|
||
| 1. Temporary system functions | ||
| 2. System functions | ||
| 3. Temporary catalog functions | ||
| 4. Catalog functions | ||
|
|
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.
This is conflating properties that I don't feel are related. built-in vs catalog and temporary vs persistent should be seperate sections.
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.
I actually feel they are related to help users understand resolution order below. Maybe I should have mentioned that in resolution order, system functions always precede catalog's and temporary functions always precede persistent on its own dimension
| The two dimensions give Flink users 4 categories of functions: | ||
|
|
||
| 1. Temporary system functions | ||
| 2. System functions | ||
| 3. Temporary catalog functions | ||
| 4. Catalog functions |
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.
I think this is unnecessary and can be removed.
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.
ditto
| --> | ||
|
|
||
| Flink Table API & SQL empowers users to do data transformations with functions. | ||
|
|
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.
Add toc
docs/dev/table/functions/index.md
Outdated
|
|
||
| In ambiguous function reference, users just specify the function's name in SQL query, e.g. `select myfunc(x) from mytable`. | ||
|
|
||
| This is the only supported option before Flink 1.10. |
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.
Remove, if a user is running an old version of Flink they can reference that versions docs.
docs/dev/table/functions/index.md
Outdated
| In Flink 1.10, we also redefined its function resolution order to be: | ||
|
|
||
| The new order is: |
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.
No need to qualify, if a user is running an old version of Flink they can reference that versions docs.
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.
the old version actually doesn't talk about this. and this will be a disruptive change
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.
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.
I agree with @sjwiesman. Personally I think the documentation should just describe the current state. Unless this is a disruptive change that requires users to change their code. I don't think this is the case. I
f I am wrong, and it does, I would mention the version, but also would mention what are the actions that a user must take and would change the title to something along the lines: "Migration guide/Migration"
docs/dev/table/functions/index.md
Outdated
| title: "Functions" | ||
| nav-id: table_functions | ||
| nav-parent_id: tableapi | ||
| nav-pos: 116 |
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.
This renders very low down, I think functions should be higher up on the side nav.
|
@sjwiesman thanks for your review. pls take another look |
|
@flinkbot attention @sjwiesman @dawidwys @fhueske |
|
Sorry I missed the notifications. I have no major concerns regarding the content. However I would prefer somebody better with the linguistic aspect gave the final approval. |
…ed dir /dev/table/functions
… function resolution orders
|
@sjwiesman I removed the 1.10 info, please take another look |
|
+1 to merge |
What is the purpose of the change
Brief change log
Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
Does this pull request potentially affect one of the following parts:
@Public(Evolving): (no)Documentation