[ https://issues.apache.org/jira/browse/CASSANDRA-20827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18014061#comment-18014061 ]
Stefan Miklosovic edited comment on CASSANDRA-20827 at 8/15/25 8:09 AM: ------------------------------------------------------------------------ Given this is system_view table, virtual one, the conditions on the output are not so strict and we could just change that on will. I do not think that it would be a big deal to be honest. Because as I mentioned, it would actually make their life easier if everything would be just a JSON. See what I wrote while you replied: _The argument here is that it would be nice to programmatically process the values. So your parser of properties from this table would have quite a hard time because it would need to branch - first trying to parse value as json and then, if not possible, it would fall back to scalars? Not good. Why not to just represent every value as a valid JSON?_ was (Author: smiklosovic): Given this is system_view table, virtual one, the conditions on the output are not so strict and we could just change that on will. I do not think that it would be a big deal to be honest. Because as I mentioned, it would actually make their life easier if everything would be just a JSON. See what I wrote why you replied: _The argument here is that it would be nice to programmatically process the values. So your parser of properties from this table would have quite a hard time because it would need to branch - first trying to parse value as json and then, if not possible, it would fall back to scalars? Not good. Why not to just represent every value as a valid JSON?_ > Represent complex settings as JSON on system_views.settings table > ----------------------------------------------------------------- > > Key: CASSANDRA-20827 > URL: https://issues.apache.org/jira/browse/CASSANDRA-20827 > Project: Apache Cassandra > Issue Type: Improvement > Components: Local/Config > Reporter: Paulo Motta > Assignee: Marko Tsymbaliuk > Priority: Normal > Time Spent: 40m > Remaining Estimate: 0h > > Complex configuration (maps/sets/lists) are represented as > Collections.toString() on {{system.settings}} virtual table: > {code:java} > cqlsh> select * from system_views.settings where name='seed_provider' ; > name | value > ------+------- > (0 rows) > cqlsh> select * from system_views.settings where > name='seed_provider.parameters' ; > name | value > --------------------------+------------------------ > seed_provider.parameters | {seeds=127.0.0.1:7000} > {code} > While this is fine for human consumption, it's not ideal for programmatic > access, since it requires custom parsing. > This ticket is to add ability of representing complex types as JSON on > {{system.settings}} and potentially making it default in trunk, so the above > would return: > {code:java} > cqlsh> select * from system_views.settings where name='seed_provider' ; > name | value > ------+------- > (0 rows) > cqlsh> select * from system_views.settings where > name='seed_provider.parameters' ; > name | value > --------------------------+------------------------ > seed_provider.parameters | {"seeds": "127.0.0.1:7000"}{code} -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org