-
Notifications
You must be signed in to change notification settings - Fork 122
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consider a scenario where input relations contain JSON strings. These strings are parsed using the recently added JSON lib and then DDlog goes on to compute on the parsed data. When working with large JSON documents where only a handful of attributes are actually used by DDlog, DDlog's memory footprint is dominated by unparsed JSON inputs. To avoid this waste, we introduce a new record type that contains serialized data represented as a string. DDlog parses this string using appropriate deserializer (currently, only json is supported) and drops the string on the floor, keeping only the extracted data in memory. Syntactically, the new type of record is written down as `@<format><string_token>`, where `<string_token>` can be either a quoted string literal or a reference to a file, e.g.: ``` insert json_test.Deserialized[@JSON"{\"@type\": \"t.V1\", \"b\": true}"] ```
- Loading branch information
Showing
8 changed files
with
64 additions
and
39 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
dump json_test.JsonTest; | ||
|
||
start; | ||
insert json_test.Deserialized[@json"{\"@type\": \"t.V1\", \"b\": true}"], | ||
commit; | ||
|
||
dump json_test.ODeserialized; |
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