forked from apache/age
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update age_load to load scalar property values with appropriate type (a…
…pache#1519) (apache#1525) Previously, property values from csv files were always loaded as strings. This patch adds a boolean function parameter `load_as_agtype`. When this parameter is true, values are converted to an appropriate scalar type (i.e. string, bool, numeric, null) while loading. Otherwise, values are loaded as string. It uses the agtype_value_from_cstring() function for conversion. Additional change(s): ------------------- - Fix: for csv rows in edge files, create_agtype_from_list_i()'s start_index is corrected to 4 Note: ---- - It applies both patch 1519 and 1525.
- Loading branch information
Showing
14 changed files
with
287 additions
and
18 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
start_id, start_vertex_type, end_id, end_vertex_type, string, bool, numeric, | ||
1, Person1, 1, Person2, "John Smith", "true", 1 | ||
1, Person1, 1, Person2, "John", "false", "-2" | ||
1, Person1, 1, Person2, John Smith, true, 1.4 | ||
1, Person1, 1, Person2, """John""", false, -1e10 | ||
1, Person1, 1, Person2, null, false, 0 | ||
1, Person1, 1, Person2, nUll, false, "3.14" |
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
id, string, bool, numeric, | ||
1, "John Smith", "true", 1 | ||
2, "John", "false", "-2" | ||
3, John Smith, true, 1.4 | ||
4, """John""", false, -1e10 | ||
5, null, false, 0 | ||
6, nUll, false, "3.14" |
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
Oops, something went wrong.