scylladb / cql-stress

10 stars 4 forks source link

c-s: Generators for simple types #83

Closed muzarski closed 3 months ago

muzarski commented 4 months ago

Fix: https://github.com/scylladb/cql-stress/issues/78

This PR introduces generator for simple types. These types do not depend on nesting the generators. For more complex types, the Generator struct and ValueGenerator trait will need to be refactored a bit.

List of the CQL types that I implemented the generators for:

For each type, there is a corresponding test case added to CI.

muzarski commented 4 months ago

v2: rebased on master

muzarski commented 3 months ago

v2.1: I addressed some of the review comments in the code.

There are still some things to be discussed. ping @wprzytula

muzarski commented 3 months ago

@wprzytula I decided to implement unit tests for other types as well. When it comes to varint and decimal types, I'll make use of num_bigint and bigdecimal crates respectively (only introduced as dev-dependencies).

muzarski commented 3 months ago

v3: implemented unit tests for the types.

muzarski commented 3 months ago

Rebased on master