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

V0.4.0 docs update #128

Merged
merged 68 commits into from
May 2, 2024
Merged

V0.4.0 docs update #128

merged 68 commits into from
May 2, 2024

Conversation

prrao87
Copy link
Member

@prrao87 prrao87 commented Apr 18, 2024

This PR collects all documentation updates for the upcoming 0.4.0 release. See kuzudb/kuzu#3280 for the list.

@prrao87 prrao87 linked an issue Apr 18, 2024 that may be closed by this pull request
@prrao87 prrao87 marked this pull request as draft April 23, 2024 17:52
@prrao87
Copy link
Member Author

prrao87 commented Apr 28, 2024

Hi @acquamarin, I've updated the LIST docs (no more FIXED-LIST, it's called ARRAY). The file of interest is here: cypher/data-types/list.md.

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 ARRAY section of the cypher/data-types/list.md?

@prrao87 prrao87 marked this pull request as ready for review April 29, 2024 16:52
src/content/docs/cypher/copy.md Outdated Show resolved Hide resolved
| `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'` |
Copy link
Contributor

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Will do!

Copy link
Member Author

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?

Copy link
Contributor

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` |
Copy link
Contributor

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.

Copy link
Member Author

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?

Copy link
Contributor

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.

src/content/docs/cypher/subquery.md Outdated Show resolved Hide resolved
src/content/docs/cypher/import-export-db.md Outdated Show resolved Hide resolved
src/content/docs/cypher/import-export-db.md Outdated Show resolved Hide resolved
Copy link
Contributor

@andyfengHKU andyfengHKU left a 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` |
Copy link
Contributor

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'` |
Copy link
Contributor

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.

@prrao87 prrao87 linked an issue May 1, 2024 that may be closed by this pull request
13 tasks
@prrao87 prrao87 merged commit 053208a into main May 2, 2024
2 checks passed
@prrao87 prrao87 deleted the v0.4.0 branch May 2, 2024 20:41
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.

Extensions docs improvements & testing Add more docs for type aliases Add new documentation for array
5 participants