Cassandra Genes Extension - #1730
Open
gonzalotguerrero wants to merge 3 commits into
Open
Conversation
jgaleotti
requested changes
Sep 3, 2026
| @@ -41,6 +56,11 @@ object CassandraColumnGeneBuilder { | |||
| "double" to { name -> DoubleGene(name) }, | |||
Collaborator
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( |
Collaborator
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( |
Collaborator
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()) |
Collaborator
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Added Genes for CQL types inet, list, set, and map