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,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC;SACzD;KACJ;IACD,MAAM,IAAI,KAAK,CAAC,uBAAuB,MAAM,GAAG,CAAC,CAAC;AACtD,CAAC","file":"json.js","sourcesContent":["// Licensed to the Apache Software Foundation (ASF) under one\n// or more contributor license agreements. See the NOTICE file\n// distributed with this work for additional information\n// regarding copyright ownership. The ASF licenses this file\n// to you under the Apache License, Version 2.0 (the\n// \"License\"); you may not use this file except in compliance\n// with the License. You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing,\n// software distributed under the License is distributed on an\n// \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n// KIND, either express or implied. See the License for the\n// specific language governing permissions and limitations\n// under the License.\n\nimport { Schema, Field } from '../../schema';\nimport {\n DataType, Dictionary, TimeBitWidth,\n Utf8, Binary, Decimal, FixedSizeBinary,\n List, FixedSizeList, Map_, Struct, Union,\n Bool, Null, Int, Float, Date_, Time, Interval, Timestamp, IntBitWidth, Int32, TKeys,\n} from '../../type';\n\nimport { DictionaryBatch, RecordBatch, FieldNode, BufferRegion } from './message';\nimport { TimeUnit, Precision, IntervalUnit, UnionMode, DateUnit } from '../../enum';\n\n/** @ignore */\nexport function schemaFromJSON(_schema: any, dictionaries: Map<number, DataType> = new Map()) {\n return new Schema(\n schemaFieldsFromJSON(_schema, dictionaries),\n customMetadataFromJSON(_schema['customMetadata']),\n dictionaries\n );\n}\n\n/** @ignore */\nexport function recordBatchFromJSON(b: any) {\n return new RecordBatch(\n b['count'],\n fieldNodesFromJSON(b['columns']),\n buffersFromJSON(b['columns'])\n );\n}\n\n/** @ignore */\nexport function dictionaryBatchFromJSON(b: any) {\n return new DictionaryBatch(\n recordBatchFromJSON(b['data']),\n b['id'], b['isDelta']\n );\n}\n\n/** @ignore */\nfunction schemaFieldsFromJSON(_schema: any, dictionaries?: Map<number, DataType>) {\n return (_schema['fields'] || []).filter(Boolean).map((f: any) => Field.fromJSON(f, dictionaries));\n}\n\n/** @ignore */\nfunction fieldChildrenFromJSON(_field: any, dictionaries?: Map<number, DataType>): Field[] {\n return (_field['children'] || []).filter(Boolean).map((f: any) => Field.fromJSON(f, dictionaries));\n}\n\n/** @ignore */\nfunction fieldNodesFromJSON(xs: any[]): FieldNode[] {\n return (xs || []).reduce<FieldNode[]>((fieldNodes, column: any) => [\n ...fieldNodes,\n new FieldNode(\n column['count'],\n nullCountFromJSON(column['VALIDITY'])\n ),\n ...fieldNodesFromJSON(column['children'])\n ], [] as FieldNode[]);\n}\n\n/** @ignore */\nfunction buffersFromJSON(xs: any[], buffers: BufferRegion[] = []): BufferRegion[] {\n for (let i = -1, n = (xs || []).length; ++i < n;) {\n const column = xs[i];\n column['VALIDITY'] && buffers.push(new BufferRegion(buffers.length, column['VALIDITY'].length));\n column['TYPE'] && buffers.push(new BufferRegion(buffers.length, column['TYPE'].length));\n column['OFFSET'] && buffers.push(new BufferRegion(buffers.length, column['OFFSET'].length));\n column['DATA'] && buffers.push(new BufferRegion(buffers.length, column['DATA'].length));\n buffers = buffersFromJSON(column['children'], buffers);\n }\n return buffers;\n}\n\n/** @ignore */\nfunction nullCountFromJSON(validity: number[]) {\n return (validity || []).reduce((sum, val) => sum + +(val === 0), 0);\n}\n\n/** @ignore */\nexport function fieldFromJSON(_field: any, dictionaries?: Map<number, DataType>) {\n\n let id: number;\n let keys: TKeys | null;\n let field: Field | void;\n let dictMeta: any;\n let type: DataType<any>;\n let dictType: Dictionary;\n\n // If no dictionary encoding\n if (!dictionaries || !(dictMeta = _field['dictionary'])) {\n type = typeFromJSON(_field, fieldChildrenFromJSON(_field, dictionaries));\n field = new Field(_field['name'], type, _field['nullable'], customMetadataFromJSON(_field['customMetadata']));\n }\n // tslint:disable\n // If dictionary encoded and the first time we've seen this dictionary id, decode\n // the data type and child fields, then wrap in a Dictionary type and insert the\n // data type into the dictionary types map.\n else if (!dictionaries.has(id = dictMeta['id'])) {\n // a dictionary index defaults to signed 32 bit int if unspecified\n keys = (keys = dictMeta['indexType']) ? indexTypeFromJSON(keys) as TKeys : new Int32();\n dictionaries.set(id, type = typeFromJSON(_field, fieldChildrenFromJSON(_field, dictionaries)));\n dictType = new Dictionary(type, keys, id, dictMeta['isOrdered']);\n field = new Field(_field['name'], dictType, _field['nullable'], customMetadataFromJSON(_field['customMetadata']));\n }\n // If dictionary encoded, and have already seen this dictionary Id in the schema, then reuse the\n // data type and wrap in a new Dictionary type and field.\n else {\n // a dictionary index defaults to signed 32 bit int if unspecified\n keys = (keys = dictMeta['indexType']) ? indexTypeFromJSON(keys) as TKeys : new Int32();\n dictType = new Dictionary(dictionaries.get(id)!, keys, id, dictMeta['isOrdered']);\n field = new Field(_field['name'], dictType, _field['nullable'], customMetadataFromJSON(_field['customMetadata']));\n }\n return field || null;\n}\n\n/** @ignore */\nfunction customMetadataFromJSON(_metadata?: object) {\n return new Map<string, string>(Object.entries(_metadata || {}));\n}\n\n/** @ignore */\nfunction indexTypeFromJSON(_type: any) {\n return new Int(_type['isSigned'], _type['bitWidth']);\n}\n\n/** @ignore */\nfunction typeFromJSON(f: any, children?: Field[]): DataType<any> {\n\n const typeId = f['type']['name'];\n\n switch (typeId) {\n case 'NONE': return new Null();\n case 'null': return new Null();\n case 'binary': return new Binary();\n case 'utf8': return new Utf8();\n case 'bool': return new Bool();\n case 'list': return new List((children || [])[0]);\n case 'struct': return new Struct(children || []);\n case 'struct_': return new Struct(children || []);\n }\n\n switch (typeId) {\n case 'int': {\n const t = f['type'];\n return new Int(t['isSigned'], t['bitWidth'] as IntBitWidth);\n }\n case 'floatingpoint': {\n const t = f['type'];\n return new Float(Precision[t['precision']] as any);\n }\n case 'decimal': {\n const t = f['type'];\n return new Decimal(t['scale'], t['precision']);\n }\n case 'date': {\n const t = f['type'];\n return new Date_(DateUnit[t['unit']] as any);\n }\n case 'time': {\n const t = f['type'];\n return new Time(TimeUnit[t['unit']] as any, t['bitWidth'] as TimeBitWidth);\n }\n case 'timestamp': {\n const t = f['type'];\n return new Timestamp(TimeUnit[t['unit']] as any, t['timezone']);\n }\n case 'interval': {\n const t = f['type'];\n return new Interval(IntervalUnit[t['unit']] as any);\n }\n case 'union': {\n const t = f['type'];\n return new Union(UnionMode[t['mode']] as any, (t['typeIds'] || []), children || []);\n }\n case 'fixedsizebinary': {\n const t = f['type'];\n return new FixedSizeBinary(t['byteWidth']);\n }\n case 'fixedsizelist': {\n const t = f['type'];\n return new FixedSizeList(t['listSize'], (children || [])[0]);\n }\n case 'map': {\n const t = f['type'];\n return new Map_((children || [])[0], t['keysSorted']);\n }\n }\n throw new Error(`Unrecognized type: \"${typeId}\"`);\n}\n"]} |