-
Notifications
You must be signed in to change notification settings - Fork 10
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
V0.4.0 docs update #128
V0.4.0 docs update #128
Conversation
Misc fixes
Add `IMPORT/EXPORT DATABASE`
Hi @acquamarin, I've updated the LIST docs (no more FIXED-LIST, it's called ARRAY). The file of interest is here: We also need to address the issue subtask: ARRAY now supports any child data type. Could you add some lines to the docs describing this part in the |
| `range(start, stop)` | returns a list of values from `start` to `stop`. Specify the step as shown [here](#range) | `range(1,3)` | `[1,2,3]` | | ||
| `coalesce(element1, element2)` | returns the first non-NULL value from the list of elements | `coalesce(NULL, 'a', NULL)` | `'a'` | |
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.
Not sure if this should be list functions. Can u double check with DuckDB
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 do!
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.
DuckDB organizes it under "utility functions":
https://duckdb.org/docs/sql/functions/utility.html
But we don't have such a page and a lot of those utility functions that they do - and in general, coalesce won't work on non-list-like objects, right?
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.
But we don't have such a page and a lot of those utility functions that they do
Similar to array functions, we can add a new page for it.
in general, coalesce won't work on non-list-like objects, right?
Normally I consider it being a variable size function meaning it can take any number of parameters. But the parameter type is not limited to LIST which makes it different from a list function.
| `ifnull(element1, element2)` | a two-argument version of coalesce | `ifnull(NULL, 'a')` | `'a'` | | ||
| `array_value(arg1, arg2, arg3..)` | creates an array containing the argument values | `array_value(1,2,3,4,5,56,2)` | `[1,2,3,4,5,56,2] | | ||
| `array_dot_product(array1, array2)` | calculates the dot product of two arrays | `array_dot_product([1,2,3], [4,5,6])` | `32` | | ||
| `array_inner_product(array1, array2)` | calculates the inner product of two arrays | `array_inner_product([1,2,3], [4,5,6])` | `32` | |
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 wonder if we should make them Array functions because they won't work with LIST of different sizes.
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.
Yeah I thought about this too, so should we just move these select functions to a separate page? And should we explicitly state that array functions only work on arrays and not variable-length lists in that page?
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.
so should we just move these select functions to a separate page
Yeah I think this is a good idea.
should we explicitly state that array functions only work on arrays and not variable-length lists in that page?
I guess this is not needed. We will perform implicit cast if necessary. If cast is not possible, we will throw exceptions. So user should be able to figure this out fairly easy.
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 2 minor comments.
| `ifnull(element1, element2)` | a two-argument version of coalesce | `ifnull(NULL, 'a')` | `'a'` | | ||
| `array_value(arg1, arg2, arg3..)` | creates an array containing the argument values | `array_value(1,2,3,4,5,56,2)` | `[1,2,3,4,5,56,2] | | ||
| `array_dot_product(array1, array2)` | calculates the dot product of two arrays | `array_dot_product([1,2,3], [4,5,6])` | `32` | | ||
| `array_inner_product(array1, array2)` | calculates the inner product of two arrays | `array_inner_product([1,2,3], [4,5,6])` | `32` | |
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.
so should we just move these select functions to a separate page
Yeah I think this is a good idea.
should we explicitly state that array functions only work on arrays and not variable-length lists in that page?
I guess this is not needed. We will perform implicit cast if necessary. If cast is not possible, we will throw exceptions. So user should be able to figure this out fairly easy.
| `range(start, stop)` | returns a list of values from `start` to `stop`. Specify the step as shown [here](#range) | `range(1,3)` | `[1,2,3]` | | ||
| `coalesce(element1, element2)` | returns the first non-NULL value from the list of elements | `coalesce(NULL, 'a', NULL)` | `'a'` | |
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.
But we don't have such a page and a lot of those utility functions that they do
Similar to array functions, we can add a new page for it.
in general, coalesce won't work on non-list-like objects, right?
Normally I consider it being a variable size function meaning it can take any number of parameters. But the parameter type is not limited to LIST which makes it different from a list function.
This PR collects all documentation updates for the upcoming 0.4.0 release. See kuzudb/kuzu#3280 for the list.