DataFrameJSON: add string enums inflation of field values (#54938)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
Leon Sorokin
2022-09-09 14:59:29 -05:00
committed by GitHub
parent b08f839c4d
commit dbb33eaba9
6 changed files with 100 additions and 27 deletions

View File

@@ -66,7 +66,8 @@ export function randomizeData(data: DataFrameJSON[], opts: Randomize): DataFrame
if (opts.values) {
schema.fields.forEach((f, idx) => {
if (f.type === FieldType.string && data) {
const v = data.values[idx].map((v) => rand(v));
// eslint-ignore-next-line
const v = data.values[idx].map((v) => rand(v as string));
data.values[idx] = v;
}
});