Cassandra Genes Extension - #1730
Conversation
| @@ -41,6 +56,11 @@ object CassandraColumnGeneBuilder { | |||
| "double" to { name -> DoubleGene(name) }, | |||
There was a problem hiding this comment.
replace string with constants
| * The [kind] is kept explicitly because the CQL literals of a list and of a set are built from the | ||
| * same kind of gene but written with different delimiters, and so could not be told apart otherwise. | ||
| */ | ||
| class CqlCollectionGene( |
There was a problem hiding this comment.
why not using a CollectionGene instead?
| * A Cassandra collection type, with how many CQL types parameterize it and how its literal is | ||
| * delimited, eg a list is written "[1, 2]" whereas a set is written "{1, 2}". | ||
| */ | ||
| enum class CqlCollectionKind( |
There was a problem hiding this comment.
I am not convinced this class is needed at all
| private fun setValueWithDecimal(bd: BigDecimal, precision: Int?, scale: Int?){ | ||
|
|
||
| val ensureRoundedValueIsInRange = (getMinimum () < bd && bd < getMaximum()) | ||
| val ensureRoundedValueIsInRange = (getMinimum () <= bd && bd <= getMaximum()) |
There was a problem hiding this comment.
is this a bug? If so, it should be in a separate branch with a test case showing the incorrect behaviour. Take into account that BigDecimalGene has fields minInclusive and maxInclusive
There was a problem hiding this comment.
Hi JP! I restored the range for now, it works again because I deleted CqlCollectionGene, but I believe its addition was what caused a test failure in GeneRandomizedTest. I think the presence of this new gene altered the sampling for some of the seeds
|
@gonzalotguerrero approved. but i guess failed build depends on completion and merge of other PR on taintarray gene? |
|
hi @arcuri82, that's correct! I'll ask for your re-review once I finish fixing that! |
Added Genes for CQL types inet, list, set, and map