You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update age_load to load scalar property values with appropriate type (#1519) (#1525) (#1581)
* Update age_load to load scalar property values with appropriate type (#1519) (#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.
Conflicts:
src/backend/utils/load/ag_load_labels.c
src/backend/utils/load/age_load.c
src/include/utils/load/ag_load_edges.h
src/include/utils/load/age_load.h
* Borrow json_validate() from PG16
The json_validate() function is borrowed from PG16 with minor changes.
Because it does not exist in other versions of PG.
* Update json_validate() to support PG12 and below
For PG12 and below, pg_parse_json() does not return an error code.
A TRY-CATCH block is used to catch errors and return false instead.
0 commit comments