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

update with random multi copy split testing info #253

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/content/docs/developer-guide/testing-framework.md
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,24 @@ In the example above:
The file must be created inside `test/statements/<name-of-the-file.cypher>`. By doing so, the testing
framework reads the query statements from the file and execute each query statement.

### Random Split Files to Copy

You can use `-MULTI_COPY_RANDOM` to randomly split a copy-able source into multiple csv files, which will then each be copied to a specified table.

```
-MULTI_COPY_RANDOM 5 test "${KUZU_ROOT_DIRECTORY}/dataset/large-serial/serialtable_merged.csv"
```

In the example above:

`-MULTI_COPY_RANDOM` is followed by an integer, being `5`, indicating the number of fragments the source should be split into. The next parameter is the table to copy into, here being `test`. The last parameter is a string that is the exact string used if the source were to be used in a `COPY FROM` statement (including the quotes and any specifications such as `delim` that follow).

Optionally, a seed can be specified after the table name to stably split the source or to reproduce a previous result. The seed is made up of two unsigned 64-bit integers. So, formally, the syntax from `-MULTI_COPY_RANDOM` is:

```
-MULTI_COPY_RANDOM <int> <string> [ SEED <int> <int> ] <string>
```

## Examples

### Full example with comments
Expand Down