forked from scylladb/scylladb
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cql3 - as_json() - Deserialize Alternator :attrs
This commit changes the behavior of SELECT JSON calls when run on top of ScyllaDB Alternator tables. By definition, DynamoDB Attributes not part of a PRIMARY KEY (Hash or Sort Key in Dynamo, nor GSIs) are encapsulated in CQL in a 'map<text, blob>' field, in turn making it hard for one to reason about the data stored there. After this commit, SELECT JSON via the CQL binary protocol will deserialize the attrs column and present it back to the user. We use the as_json() machinery as it takes care of returning the entire ResultSet as a String, which in turn makes it easy for drivers to parse it. Note that this commit does NOT transform the entire ResultSet as it would be returned by DynamoDB. It only deserializes the ":attrs" column and does nothing else. Arguably, implementing the remaining machinery wouldn't be so hard, but it is not part of this single experiment done for personal learning purposes. :-) Also, note some changes to tests were needed to prevent link breakage. This was particularly needed given that this commit simply includes alternator under cql3.
- Loading branch information
Felipe Mendes
authored and
root
committed
Aug 30, 2024
1 parent
67b2485
commit a60a524
Showing
8 changed files
with
70 additions
and
41 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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