@terascope/data-mate / function-configs/json/sql-utils
function-configs/json/sql-utils
Variables
JSON_SQL_TYPES
constJSON_SQL_TYPES: readonlyFieldType[]
Defined in: data-mate/src/function-configs/json/sql-utils.ts:21
The column types where to_json produces exactly what JSON.stringify produces.
The other types are left out on purpose:
- Floating point:
to_json(2.0)is'2.0'whereJSON.stringify(2)is'2', andto_jsonwrites1e21where JavaScript writes1e+21. - Date: a TIMESTAMP renders as
"2026-01-02 03:04:05.678", without theTor theZ. - Integer and Long: not yet compared against the JavaScript.
to_jsonrenders them, and the UDF path handles them (seeudf-types-spec), so they are candidates to add. - Any/JSON, GeoJSON, GeoPoint, Object and Tuple: not yet compared against the JavaScript.
to_jsonon a STRUCT matchesJSON.stringify, including key order, so these are candidates to add.