[jira] [Commented] (CASSANDRA-17518) CommitLog and SSTable entry structures/specs?
[ https://issues.apache.org/jira/browse/CASSANDRA-17518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17516739#comment-17516739 ] Sina Siadat commented on CASSANDRA-17518: - Ah my bad, sorry about that. Thank you for the link! > CommitLog and SSTable entry structures/specs? > - > > Key: CASSANDRA-17518 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17518 > Project: Cassandra > Issue Type: Task > Components: Local/Commit Log, Local/SSTable >Reporter: Sina Siadat >Priority: Normal > > Hi! Is there a document or spec file that describes the format for > reading/writing entries in the commitlog and in the sstables? I was thinking > of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like > the [CQL Binary Protocol > spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). > For example, it would say "each commitlog entry starts with a byte for write > type, then 1 byte for the size of the keyspace name string ... etc." > If not, which serializers/deserialiers in the source code should I look into? > So far, it looks like instances of the [Mutation > class|https://sourcegraph.com/github.com/apache/cassandra/-/blob/src/java/org/apache/cassandra/db/Mutation.java] > are what is being serialized, however, I still don't have a clear picture > how they are serialized/deserialized to the extend to which I would be able > to parse/write the byte arrays to and from the files. > I was also wondering if it be correct to say that each one entry in SSTables > and CommitLogs are serialized and deserialized the same way? > This is just a challenge I am setting for myself to inspect/read/write > commitlog and sstable entries. Thank you :) -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17518) CommitLog and SSTable entry structures/specs?
[ https://issues.apache.org/jira/browse/CASSANDRA-17518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sina Siadat updated CASSANDRA-17518: Description: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for write type, then 1 byte for the size of the keyspace name string ... etc." If not, which serializers/deserialiers in the source code should I look into? So far, it looks like instances of the [Mutation class|https://sourcegraph.com/github.com/apache/cassandra/-/blob/src/java/org/apache/cassandra/db/Mutation.java] are what is being serialized, however, I still don't have a clear picture how they are serialized/deserialized to the extend to which I would be able to parse/write the byte arrays to and from the files. I was also wondering if it be correct to say that each one entry in SSTables and CommitLogs are serialized and deserialized the same way? This is just a challenge I am setting for myself to inspect/read/write commitlog and sstable entries. Thank you :) was: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for write type, then 1 byte for the size of the keyspace name string ... etc." If not, which serializers/deserialiers in the source code should I look into? So far, it looks like instances of the [Mutation class|https://sourcegraph.com/github.com/apache/cassandra/-/blob/src/java/org/apache/cassandra/db/Mutation.java] are what is being serialized, however, I still don't have a clear picture how they are serialized/deserialized to the extend to which I would be able to parse/write the byte arrays to and from the files. This is just a challenge I am setting for myself to inspect/read/write commitlog and sstable entries. Thank you :) > CommitLog and SSTable entry structures/specs? > - > > Key: CASSANDRA-17518 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17518 > Project: Cassandra > Issue Type: Task > Components: Local/Commit Log, Local/SSTable >Reporter: Sina Siadat >Priority: Normal > > Hi! Is there a document or spec file that describes the format for > reading/writing entries in the commitlog and in the sstables? I was thinking > of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like > the [CQL Binary Protocol > spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). > For example, it would say "each commitlog entry starts with a byte for write > type, then 1 byte for the size of the keyspace name string ... etc." > If not, which serializers/deserialiers in the source code should I look into? > So far, it looks like instances of the [Mutation > class|https://sourcegraph.com/github.com/apache/cassandra/-/blob/src/java/org/apache/cassandra/db/Mutation.java] > are what is being serialized, however, I still don't have a clear picture > how they are serialized/deserialized to the extend to which I would be able > to parse/write the byte arrays to and from the files. > I was also wondering if it be correct to say that each one entry in SSTables > and CommitLogs are serialized and deserialized the same way? > This is just a challenge I am setting for myself to inspect/read/write > commitlog and sstable entries. Thank you :) -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17518) CommitLog and SSTable entry structures/specs?
[ https://issues.apache.org/jira/browse/CASSANDRA-17518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sina Siadat updated CASSANDRA-17518: Description: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for write type, then 1 byte for the size of the keyspace name string ... etc." If not, which serializers/deserialiers in the source code should I look into? So far, it looks like instances of the [Mutation class|https://sourcegraph.com/github.com/apache/cassandra/-/blob/src/java/org/apache/cassandra/db/Mutation.java] are what is being serialized, however, I still don't have a clear picture how they are serialized/deserialized to the extend to which I would be able to parse/write the byte arrays to and from the files. This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) was: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for write type, then 1 byte for the size of the keyspace name string ... etc." If not, which serializers/deserialiers in the source code should I look into? So far, it looks like instances of the [Mutation class|https://sourcegraph.com/github.com/apache/cassandra/-/blob/src/java/org/apache/cassandra/db/Mutation.java] are what is being serialized, however, I still don't have a clear picture how they are serialized/deserialized to and from byte arrays. This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) > CommitLog and SSTable entry structures/specs? > - > > Key: CASSANDRA-17518 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17518 > Project: Cassandra > Issue Type: Task > Components: Local/Commit Log, Local/SSTable >Reporter: Sina Siadat >Priority: Normal > > Hi! Is there a document or spec file that describes the format for > reading/writing entries in the commitlog and in the sstables? I was thinking > of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like > the [CQL Binary Protocol > spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). > For example, it would say "each commitlog entry starts with a byte for write > type, then 1 byte for the size of the keyspace name string ... etc." > If not, which serializers/deserialiers in the source code should I look into? > So far, it looks like instances of the [Mutation > class|https://sourcegraph.com/github.com/apache/cassandra/-/blob/src/java/org/apache/cassandra/db/Mutation.java] > are what is being serialized, however, I still don't have a clear picture > how they are serialized/deserialized to the extend to which I would be able > to parse/write the byte arrays to and from the files. > This is just a challenge I am setting for myself to inspect/read/write > commitlog (and sstable) entries. Thank you :) -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17518) CommitLog and SSTable entry structures/specs?
[ https://issues.apache.org/jira/browse/CASSANDRA-17518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sina Siadat updated CASSANDRA-17518: Description: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for write type, then 1 byte for the size of the keyspace name string ... etc." If not, which serializers/deserialiers in the source code should I look into? So far, it looks like instances of the [Mutation class|https://sourcegraph.com/github.com/apache/cassandra/-/blob/src/java/org/apache/cassandra/db/Mutation.java] are what is being serialized, however, I still don't have a clear picture how they are serialized/deserialized to the extend to which I would be able to parse/write the byte arrays to and from the files. This is just a challenge I am setting for myself to inspect/read/write commitlog and sstable entries. Thank you :) was: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for write type, then 1 byte for the size of the keyspace name string ... etc." If not, which serializers/deserialiers in the source code should I look into? So far, it looks like instances of the [Mutation class|https://sourcegraph.com/github.com/apache/cassandra/-/blob/src/java/org/apache/cassandra/db/Mutation.java] are what is being serialized, however, I still don't have a clear picture how they are serialized/deserialized to the extend to which I would be able to parse/write the byte arrays to and from the files. This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) > CommitLog and SSTable entry structures/specs? > - > > Key: CASSANDRA-17518 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17518 > Project: Cassandra > Issue Type: Task > Components: Local/Commit Log, Local/SSTable >Reporter: Sina Siadat >Priority: Normal > > Hi! Is there a document or spec file that describes the format for > reading/writing entries in the commitlog and in the sstables? I was thinking > of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like > the [CQL Binary Protocol > spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). > For example, it would say "each commitlog entry starts with a byte for write > type, then 1 byte for the size of the keyspace name string ... etc." > If not, which serializers/deserialiers in the source code should I look into? > So far, it looks like instances of the [Mutation > class|https://sourcegraph.com/github.com/apache/cassandra/-/blob/src/java/org/apache/cassandra/db/Mutation.java] > are what is being serialized, however, I still don't have a clear picture > how they are serialized/deserialized to the extend to which I would be able > to parse/write the byte arrays to and from the files. > This is just a challenge I am setting for myself to inspect/read/write > commitlog and sstable entries. Thank you :) -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17518) CommitLog and SSTable entry structures/specs?
[ https://issues.apache.org/jira/browse/CASSANDRA-17518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sina Siadat updated CASSANDRA-17518: Description: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for write type, then 1 byte for the size of the keyspace name string ... etc." If not, which serializers/deserialiers in the source code should I look into? So far, it looks like instances of the [Mutation class|https://sourcegraph.com/github.com/apache/cassandra/-/blob/src/java/org/apache/cassandra/db/Mutation.java] are what is being serialized, however, I still don't have a clear picture how they are serialized/deserialized to and from byte arrays. This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) was: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for write type, then 1 byte for the size of the keyspace name string ... etc." If not, which serializers/deserialiers in the source code should I look into? So far, it looks like Mutations are what is being serialized, however, I still don't have a clear picture how they are serialized/deserialized to and from byte arrays. This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) > CommitLog and SSTable entry structures/specs? > - > > Key: CASSANDRA-17518 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17518 > Project: Cassandra > Issue Type: Task > Components: Local/Commit Log, Local/SSTable >Reporter: Sina Siadat >Priority: Normal > > Hi! Is there a document or spec file that describes the format for > reading/writing entries in the commitlog and in the sstables? I was thinking > of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like > the [CQL Binary Protocol > spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). > For example, it would say "each commitlog entry starts with a byte for write > type, then 1 byte for the size of the keyspace name string ... etc." > If not, which serializers/deserialiers in the source code should I look into? > So far, it looks like instances of the [Mutation > class|https://sourcegraph.com/github.com/apache/cassandra/-/blob/src/java/org/apache/cassandra/db/Mutation.java] > are what is being serialized, however, I still don't have a clear picture > how they are serialized/deserialized to and from byte arrays. > This is just a challenge I am setting for myself to inspect/read/write > commitlog (and sstable) entries. Thank you :) -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17518) CommitLog and SSTable entry structures/specs?
[ https://issues.apache.org/jira/browse/CASSANDRA-17518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sina Siadat updated CASSANDRA-17518: Description: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for write type, then 1 byte for the size of the keyspace name string ... etc." If not, which serializers/deserialiers in the source code should I look into? So far, it looks like Mutations are what is being serialized, however, I still don't have a clear picture how they are serialized/deserialized. This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) was: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for write type, then 1 byte for the size of the keyspace name string ... etc." If not, which serializers/deserialiers in the source code should I look into? This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) > CommitLog and SSTable entry structures/specs? > - > > Key: CASSANDRA-17518 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17518 > Project: Cassandra > Issue Type: Task > Components: Local/Commit Log, Local/SSTable >Reporter: Sina Siadat >Priority: Normal > > Hi! Is there a document or spec file that describes the format for > reading/writing entries in the commitlog and in the sstables? I was thinking > of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like > the [CQL Binary Protocol > spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). > For example, it would say "each commitlog entry starts with a byte for write > type, then 1 byte for the size of the keyspace name string ... etc." > If not, which serializers/deserialiers in the source code should I look into? > So far, it looks like Mutations are what is being serialized, however, I > still don't have a clear picture how they are serialized/deserialized. > This is just a challenge I am setting for myself to inspect/read/write > commitlog (and sstable) entries. Thank you :) -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17518) CommitLog and SSTable entry structures/specs?
[ https://issues.apache.org/jira/browse/CASSANDRA-17518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sina Siadat updated CASSANDRA-17518: Description: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for write type, then 1 byte for the size of the keyspace name string ... etc." If not, which serializers/deserialiers in the source code should I look into? So far, it looks like Mutations are what is being serialized, however, I still don't have a clear picture how they are serialized/deserialized to byte arrays. This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) was: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for write type, then 1 byte for the size of the keyspace name string ... etc." If not, which serializers/deserialiers in the source code should I look into? So far, it looks like Mutations are what is being serialized, however, I still don't have a clear picture how they are serialized/deserialized. This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) > CommitLog and SSTable entry structures/specs? > - > > Key: CASSANDRA-17518 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17518 > Project: Cassandra > Issue Type: Task > Components: Local/Commit Log, Local/SSTable >Reporter: Sina Siadat >Priority: Normal > > Hi! Is there a document or spec file that describes the format for > reading/writing entries in the commitlog and in the sstables? I was thinking > of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like > the [CQL Binary Protocol > spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). > For example, it would say "each commitlog entry starts with a byte for write > type, then 1 byte for the size of the keyspace name string ... etc." > If not, which serializers/deserialiers in the source code should I look into? > So far, it looks like Mutations are what is being serialized, however, I > still don't have a clear picture how they are serialized/deserialized to byte > arrays. > This is just a challenge I am setting for myself to inspect/read/write > commitlog (and sstable) entries. Thank you :) -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17518) CommitLog and SSTable entry structures/specs?
[ https://issues.apache.org/jira/browse/CASSANDRA-17518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sina Siadat updated CASSANDRA-17518: Description: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for write type, then 1 byte for the size of the keyspace name string ... etc." If not, which serializers/deserialiers in the source code should I look into? So far, it looks like Mutations are what is being serialized, however, I still don't have a clear picture how they are serialized/deserialized to and from byte arrays. This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) was: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for write type, then 1 byte for the size of the keyspace name string ... etc." If not, which serializers/deserialiers in the source code should I look into? So far, it looks like Mutations are what is being serialized, however, I still don't have a clear picture how they are serialized/deserialized to byte arrays. This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) > CommitLog and SSTable entry structures/specs? > - > > Key: CASSANDRA-17518 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17518 > Project: Cassandra > Issue Type: Task > Components: Local/Commit Log, Local/SSTable >Reporter: Sina Siadat >Priority: Normal > > Hi! Is there a document or spec file that describes the format for > reading/writing entries in the commitlog and in the sstables? I was thinking > of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like > the [CQL Binary Protocol > spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). > For example, it would say "each commitlog entry starts with a byte for write > type, then 1 byte for the size of the keyspace name string ... etc." > If not, which serializers/deserialiers in the source code should I look into? > So far, it looks like Mutations are what is being serialized, however, I > still don't have a clear picture how they are serialized/deserialized to and > from byte arrays. > This is just a challenge I am setting for myself to inspect/read/write > commitlog (and sstable) entries. Thank you :) -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17518) CommitLog and SSTable entry structures/specs?
[ https://issues.apache.org/jira/browse/CASSANDRA-17518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sina Siadat updated CASSANDRA-17518: Description: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for write type, then 1 byte for the size of the keyspace name string ... etc." If not, which serializers/deserialiers in the source code should I look into? This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) was: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for write type, then 1 byte for the size of the keyspace name string ... etc." If not, which serializers in the source code should I look into? This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) > CommitLog and SSTable entry structures/specs? > - > > Key: CASSANDRA-17518 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17518 > Project: Cassandra > Issue Type: Task > Components: Local/Commit Log, Local/SSTable >Reporter: Sina Siadat >Priority: Normal > > Hi! Is there a document or spec file that describes the format for > reading/writing entries in the commitlog and in the sstables? I was thinking > of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like > the [CQL Binary Protocol > spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). > For example, it would say "each commitlog entry starts with a byte for write > type, then 1 byte for the size of the keyspace name string ... etc." > If not, which serializers/deserialiers in the source code should I look into? > This is just a challenge I am setting for myself to inspect/read/write > commitlog (and sstable) entries. Thank you :) -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17518) CommitLog and SSTable entry structures/specs?
[ https://issues.apache.org/jira/browse/CASSANDRA-17518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sina Siadat updated CASSANDRA-17518: Description: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for write type, then 2 bytes for the size of the keyspace name string ... etc." If not, which serializers in the source code should I look into? This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) was: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for ... then 2 bytes for the size ... etc." If not, which serializers in the source code should I look into? This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) > CommitLog and SSTable entry structures/specs? > - > > Key: CASSANDRA-17518 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17518 > Project: Cassandra > Issue Type: Task > Components: Local/Commit Log, Local/SSTable >Reporter: Sina Siadat >Priority: Normal > > Hi! Is there a document or spec file that describes the format for > reading/writing entries in the commitlog and in the sstables? I was thinking > of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like > the [CQL Binary Protocol > spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). > For example, it would say "each commitlog entry starts with a byte for write > type, then 2 bytes for the size of the keyspace name string ... etc." > If not, which serializers in the source code should I look into? > This is just a challenge I am setting for myself to inspect/read/write > commitlog (and sstable) entries. Thank you :) -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17518) CommitLog and SSTable entry structures/specs?
[ https://issues.apache.org/jira/browse/CASSANDRA-17518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sina Siadat updated CASSANDRA-17518: Description: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for write type, then 1 byte for the size of the keyspace name string ... etc." If not, which serializers in the source code should I look into? This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) was: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for write type, then 2 bytes for the size of the keyspace name string ... etc." If not, which serializers in the source code should I look into? This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) > CommitLog and SSTable entry structures/specs? > - > > Key: CASSANDRA-17518 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17518 > Project: Cassandra > Issue Type: Task > Components: Local/Commit Log, Local/SSTable >Reporter: Sina Siadat >Priority: Normal > > Hi! Is there a document or spec file that describes the format for > reading/writing entries in the commitlog and in the sstables? I was thinking > of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like > the [CQL Binary Protocol > spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). > For example, it would say "each commitlog entry starts with a byte for write > type, then 1 byte for the size of the keyspace name string ... etc." > If not, which serializers in the source code should I look into? > This is just a challenge I am setting for myself to inspect/read/write > commitlog (and sstable) entries. Thank you :) -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17518) CommitLog and SSTable entry structures/specs?
[ https://issues.apache.org/jira/browse/CASSANDRA-17518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sina Siadat updated CASSANDRA-17518: Description: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [CQL Binary Protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for ... then 2 bytes for the size ... etc." If not, which serializers in the source code should I look into? This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) was: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [native protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for ... then 2 bytes for the size ... etc." If not, which serializers in the source code should I look into? This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) > CommitLog and SSTable entry structures/specs? > - > > Key: CASSANDRA-17518 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17518 > Project: Cassandra > Issue Type: Task > Components: Local/Commit Log, Local/SSTable >Reporter: Sina Siadat >Priority: Normal > > Hi! Is there a document or spec file that describes the format for > reading/writing entries in the commitlog and in the sstables? I was thinking > of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like > the [CQL Binary Protocol > spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). > For example, it would say "each commitlog entry starts with a byte for ... > then 2 bytes for the size ... etc." > If not, which serializers in the source code should I look into? > This is just a challenge I am setting for myself to inspect/read/write > commitlog (and sstable) entries. Thank you :) -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17518) CommitLog and SSTable entry structures/specs?
[ https://issues.apache.org/jira/browse/CASSANDRA-17518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sina Siadat updated CASSANDRA-17518: Description: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like the [native protocol spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). For example, it would say "each commitlog entry starts with a byte for ... then 2 bytes for the size ... etc." If not, which serializers in the source code should I look into? This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) was: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file. For example, it would say "each commitlog entry starts with a byte for ... then 2 bytes for the size ... etc." If not, which serializers in the source code should I look into? This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) > CommitLog and SSTable entry structures/specs? > - > > Key: CASSANDRA-17518 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17518 > Project: Cassandra > Issue Type: Task > Components: Local/Commit Log, Local/SSTable >Reporter: Sina Siadat >Priority: Normal > > Hi! Is there a document or spec file that describes the format for > reading/writing entries in the commitlog and in the sstables? I was thinking > of something like a [Kaitai|https://kaitai.io/] struct or a spec file (like > the [native protocol > spec|https://github.com/apache/cassandra/blob/trunk/doc/native_protocol_v5.spec]). > For example, it would say "each commitlog entry starts with a byte for ... > then 2 bytes for the size ... etc." > If not, which serializers in the source code should I look into? > This is just a challenge I am setting for myself to inspect/read/write > commitlog (and sstable) entries. Thank you :) -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17518) CommitLog and SSTable entry structures/specs?
[ https://issues.apache.org/jira/browse/CASSANDRA-17518?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sina Siadat updated CASSANDRA-17518: Description: Hi! Is there a document or spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file. For example, it would say "each commitlog entry starts with a byte for ... then 2 bytes for the size ... etc." If not, which serializers in the source code should I look into? This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) was: Hi :) Is there a document spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file. For example, it would say "each commitlog entry starts with a byte for ... then 2 bytes for the size ... etc." If not, which serializers in the source code should I look into? This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) > CommitLog and SSTable entry structures/specs? > - > > Key: CASSANDRA-17518 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17518 > Project: Cassandra > Issue Type: Task > Components: Local/Commit Log, Local/SSTable >Reporter: Sina Siadat >Priority: Normal > > Hi! Is there a document or spec file that describes the format for > reading/writing entries in the commitlog and in the sstables? I was thinking > of something like a [Kaitai|https://kaitai.io/] struct or a spec file. For > example, it would say "each commitlog entry starts with a byte for ... then 2 > bytes for the size ... etc." > If not, which serializers in the source code should I look into? > This is just a challenge I am setting for myself to inspect/read/write > commitlog (and sstable) entries. Thank you :) -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Created] (CASSANDRA-17518) CommitLog and SSTable entry structures/specs?
Sina Siadat created CASSANDRA-17518: --- Summary: CommitLog and SSTable entry structures/specs? Key: CASSANDRA-17518 URL: https://issues.apache.org/jira/browse/CASSANDRA-17518 Project: Cassandra Issue Type: Task Components: Local/Commit Log, Local/SSTable Reporter: Sina Siadat Hi :) Is there a document spec file that describes the format for reading/writing entries in the commitlog and in the sstables? I was thinking of something like a [Kaitai|https://kaitai.io/] struct or a spec file. For example, it would say "each commitlog entry starts with a byte for ... then 2 bytes for the size ... etc." If not, which serializers in the source code should I look into? This is just a challenge I am setting for myself to inspect/read/write commitlog (and sstable) entries. Thank you :) -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17238) Constants$Literal.getText does not escape ' chars
[ https://issues.apache.org/jira/browse/CASSANDRA-17238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sina Siadat updated CASSANDRA-17238: Description: The [current implementation|https://sourcegraph.com/github.com/apache/cassandra@b83d722b99de79d131f58512564b901b11907182/-/blob/src/java/org/apache/cassandra/cql3/Constants.java?L358-361] is only adding single quotes around the text: {code:java} public String getText() { return type == Type.STRING ? String.format("'%s'", text) : text; } {code} So, getText for this string: {code:java} 'this is a ''quoted'' word' {code} would return {code:java} 'this is a 'quoted' word' {code} Maybe something like this would fix it, if necessary: {code:java} public String getText() { return type == Type.STRING ? String.format("'%s'", StringUtils.replace(text, "'", "''")) : text; } {code} was: The [current implementation|https://sourcegraph.com/github.com/apache/cassandra@b83d722b99de79d131f58512564b901b11907182/-/blob/src/java/org/apache/cassandra/cql3/Constants.java?L358-361] is only adding single quotes around the text: {code:java} public String getText() { return type == Type.STRING ? String.format("'%s'", text) : text; } {code} So, getText for this string: {code} 'this is a ''quoted'' word' {code} would return {code} 'this is a 'quoted' word' {code} Something like this is necessary: {code:java} public String getText() { return type == Type.STRING ? String.format("'%s'", StringUtils.replace(text, "'", "''")) : text; } {code} > Constants$Literal.getText does not escape ' chars > - > > Key: CASSANDRA-17238 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17238 > Project: Cassandra > Issue Type: Bug >Reporter: Sina Siadat >Priority: Normal > > The [current > implementation|https://sourcegraph.com/github.com/apache/cassandra@b83d722b99de79d131f58512564b901b11907182/-/blob/src/java/org/apache/cassandra/cql3/Constants.java?L358-361] > is only adding single quotes around the text: > {code:java} > public String getText() > { > return type == Type.STRING ? String.format("'%s'", text) : text; > } > {code} > So, getText for this string: > {code:java} > 'this is a ''quoted'' word' > {code} > would return > {code:java} > 'this is a 'quoted' word' > {code} > Maybe something like this would fix it, if necessary: > {code:java} > public String getText() > { > return type == Type.STRING ? String.format("'%s'", > StringUtils.replace(text, "'", "''")) : text; > } > {code} -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Comment Edited] (CASSANDRA-17238) Constants$Literal.getText does not escape ' chars
[ https://issues.apache.org/jira/browse/CASSANDRA-17238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17469431#comment-17469431 ] Sina Siadat edited comment on CASSANDRA-17238 at 1/6/22, 11:57 PM: --- Yes, CQL keywords wouldn't need this kind of protection, but the problem here is for getText when type is Type.STRING. Is it ever used with inputs of that type? If so and if I'm not mistaken, getText for this CQL string: {code:java} 'this is a ''quoted'' word' {code} would return {code:java} 'this is a 'quoted' word' {code} which is probably an incorrect representation of the CQL string. was (Author: JIRAUSER283097): Yes, CQL keywords wouldn't need this kind of protection, but the problem here is for getText when type is Type.STRING. So, getText for this CQL string: {code} 'this is a ''quoted'' word' {code} would return {code} 'this is a 'quoted' word' {code} which is an incorrect representation of the CQL string. > Constants$Literal.getText does not escape ' chars > - > > Key: CASSANDRA-17238 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17238 > Project: Cassandra > Issue Type: Bug >Reporter: Sina Siadat >Priority: Normal > > The [current > implementation|https://sourcegraph.com/github.com/apache/cassandra@b83d722b99de79d131f58512564b901b11907182/-/blob/src/java/org/apache/cassandra/cql3/Constants.java?L358-361] > is only adding single quotes around the text: > {code:java} > public String getText() > { > return type == Type.STRING ? String.format("'%s'", text) : text; > } > {code} > So, getText for this string: > {code} > 'this is a ''quoted'' word' > {code} > would return > {code} > 'this is a 'quoted' word' > {code} > Something like this is necessary: > {code:java} > public String getText() > { > return type == Type.STRING ? String.format("'%s'", > StringUtils.replace(text, "'", "''")) : text; > } > {code} -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Commented] (CASSANDRA-17238) Constants$Literal.getText does not escape ' chars
[ https://issues.apache.org/jira/browse/CASSANDRA-17238?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17469431#comment-17469431 ] Sina Siadat commented on CASSANDRA-17238: - Yes, CQL keywords wouldn't need this kind of protection, but the problem here is for getText when type is Type.STRING. So, getText for this CQL string: {code} 'this is a ''quoted'' word' {code} would return {code} 'this is a 'quoted' word' {code} which is an incorrect representation of the CQL string. > Constants$Literal.getText does not escape ' chars > - > > Key: CASSANDRA-17238 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17238 > Project: Cassandra > Issue Type: Bug >Reporter: Sina Siadat >Priority: Normal > > The [current > implementation|https://sourcegraph.com/github.com/apache/cassandra@b83d722b99de79d131f58512564b901b11907182/-/blob/src/java/org/apache/cassandra/cql3/Constants.java?L358-361] > is only adding single quotes around the text: > {code:java} > public String getText() > { > return type == Type.STRING ? String.format("'%s'", text) : text; > } > {code} > So, getText for this string: > {code} > 'this is a ''quoted'' word' > {code} > would return > {code} > 'this is a 'quoted' word' > {code} > Something like this is necessary: > {code:java} > public String getText() > { > return type == Type.STRING ? String.format("'%s'", > StringUtils.replace(text, "'", "''")) : text; > } > {code} -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17238) Constants$Literal.getText does not escape ' chars
[ https://issues.apache.org/jira/browse/CASSANDRA-17238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sina Siadat updated CASSANDRA-17238: Description: The [current implementation|https://sourcegraph.com/github.com/apache/cassandra@b83d722b99de79d131f58512564b901b11907182/-/blob/src/java/org/apache/cassandra/cql3/Constants.java?L358-361] is only adding single quotes around the text: {code:java} public String getText() { return type == Type.STRING ? String.format("'%s'", text) : text; } {code} So, getText for this string: {code} 'this is a ''quoted'' word' {code} would return {code} 'this is a 'quoted' word' {code} Something like this is necessary: {code:java} public String getText() { return type == Type.STRING ? String.format("'%s'", StringUtils.replace(text, "'", "''")) : text; } {code} was: The [current implementation|https://sourcegraph.com/github.com/apache/cassandra@b83d722b99de79d131f58512564b901b11907182/-/blob/src/java/org/apache/cassandra/cql3/Constants.java?L358-361] is only adding single quotes around the text: {code:java} public String getText() { return type == Type.STRING ? String.format("'%s'", text) : text; } {code} Something like this is necessary (I'm not sure if we need to do anything with the newline characters): {code:java} public String getText() { return type == Type.STRING ? String.format("'%s'", StringUtils.replace(text, "'", "''")) : text; } {code} > Constants$Literal.getText does not escape ' chars > - > > Key: CASSANDRA-17238 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17238 > Project: Cassandra > Issue Type: Bug >Reporter: Sina Siadat >Priority: Normal > > The [current > implementation|https://sourcegraph.com/github.com/apache/cassandra@b83d722b99de79d131f58512564b901b11907182/-/blob/src/java/org/apache/cassandra/cql3/Constants.java?L358-361] > is only adding single quotes around the text: > {code:java} > public String getText() > { > return type == Type.STRING ? String.format("'%s'", text) : text; > } > {code} > So, getText for this string: > {code} > 'this is a ''quoted'' word' > {code} > would return > {code} > 'this is a 'quoted' word' > {code} > Something like this is necessary: > {code:java} > public String getText() > { > return type == Type.STRING ? String.format("'%s'", > StringUtils.replace(text, "'", "''")) : text; > } > {code} -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Updated] (CASSANDRA-17238) Constants$Literal.getText does not escape ' chars
[ https://issues.apache.org/jira/browse/CASSANDRA-17238?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Sina Siadat updated CASSANDRA-17238: Component/s: (was: CQL/Semantics) > Constants$Literal.getText does not escape ' chars > - > > Key: CASSANDRA-17238 > URL: https://issues.apache.org/jira/browse/CASSANDRA-17238 > Project: Cassandra > Issue Type: Bug >Reporter: Sina Siadat >Priority: Normal > > The [current > implementation|https://sourcegraph.com/github.com/apache/cassandra@b83d722b99de79d131f58512564b901b11907182/-/blob/src/java/org/apache/cassandra/cql3/Constants.java?L358-361] > is only adding single quotes around the text: > {code:java} > public String getText() > { > return type == Type.STRING ? String.format("'%s'", text) : text; > } > {code} > Something like this is necessary (I'm not sure if we need to do anything with > the newline characters): > {code:java} > public String getText() > { > return type == Type.STRING ? String.format("'%s'", > StringUtils.replace(text, "'", "''")) : text; > } > {code} -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org
[jira] [Created] (CASSANDRA-17238) Constants$Literal.getText does not escape ' chars
Sina Siadat created CASSANDRA-17238: --- Summary: Constants$Literal.getText does not escape ' chars Key: CASSANDRA-17238 URL: https://issues.apache.org/jira/browse/CASSANDRA-17238 Project: Cassandra Issue Type: Bug Components: CQL/Semantics Reporter: Sina Siadat The [current implementation|https://sourcegraph.com/github.com/apache/cassandra@b83d722b99de79d131f58512564b901b11907182/-/blob/src/java/org/apache/cassandra/cql3/Constants.java?L358-361] is only adding single quotes around the text: {code:java} public String getText() { return type == Type.STRING ? String.format("'%s'", text) : text; } {code} Something like this is necessary (I'm not sure if we need to do anything with the newline characters): {code:java} public String getText() { return type == Type.STRING ? String.format("'%s'", StringUtils.replace(text, "'", "''")) : text; } {code} -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org