Skip to content

util/parquet: refactor random testing types#103617

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
jayshrivastava:parquet-new-random
May 19, 2023
Merged

util/parquet: refactor random testing types#103617
craig[bot] merged 1 commit intocockroachdb:masterfrom
jayshrivastava:parquet-new-random

Conversation

@jayshrivastava
Copy link
Copy Markdown
Contributor

This change refactors randomized testing to use randgen.RandType. randgen.RandType is better as it takes into account all allowable types which can appear in CRDB (ex. array of tuple). The previous code only generated random types which are supported by the writer which leaves a gap when new types are added. Now, the code defaults to all types and filters out unsupported ones.

Informs: #99028
Epic: https://cockroachlabs.atlassian.net/browse/CRDB-15071
Release note: None

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

This change refactors randomized testing to use `randgen.RandType`.
`randgen.RandType` is better as it takes into account all allowable
types which can appear in CRDB (ex. array of tuple). The previous
code only generated random types which are supported by the writer
which leaves a gap when new types are added. Now, the code defaults
to all types and filters out unsupported ones.

The previous code also unnessarily duplicates code from `randgen`.
For example, generating a random tuple can be done by calling one
method in `randgen`. Generating a random tuple using the
previous code would require more complex work.

Informs: cockroachdb#99028
Epic: https://cockroachlabs.atlassian.net/browse/CRDB-15071
Release note: None
@jayshrivastava jayshrivastava marked this pull request as ready for review May 19, 2023 17:20
@jayshrivastava jayshrivastava requested a review from miretskiy May 19, 2023 17:21
@jayshrivastava
Copy link
Copy Markdown
Contributor Author

bors r=miretskiy

@craig
Copy link
Copy Markdown
Contributor

craig bot commented May 19, 2023

Build succeeded:

@craig craig bot merged commit b5283bc into cockroachdb:master May 19, 2023
@jayshrivastava jayshrivastava mentioned this pull request May 19, 2023
13 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.

3 participants