-
[OPIK-4680] [FE] fix: preserve column types when adding/editing dataset items via POST /changes (#5493)
发布于
2026-03-04 12:48:16 +00:00 The versioned dataset item flow (POST /changes) was losing JSON types — numbers,
booleans, and objects were all stored as strings in ClickHouse. The FE form
round-trip converted everything to JS strings, and prepareFormDataForSave only
restored types for fields already tagged as COMPLEX, missing new items entirely.- Rewrite prepareFormDataForSave to use column type metadata from the API instead
of FIELD_TYPE for type coercion (number, boolean, object/array, string fallback) - Always parse valid JSON objects/arrays regardless of column type (user intent)
- Wire columns through to both add (AddDatasetItemSidebar) and edit
(DatasetItemEditorAutosaveContext) paths - Invalidate single-dataset query after batch insert so latest_version is available
for subsequent POST /changes calls - Add 21 unit tests for prepareFormDataForSave
下载附件
- Rewrite prepareFormDataForSave to use column type metadata from the API instead