mirror of
https://github.com/asadbek064/hyparquet.git
synced 2025-12-05 22:41:55 +00:00
Handle repeated with no children
This commit is contained in:
parent
ed3b525a27
commit
7a08aa3183
@ -108,8 +108,13 @@ export function assembleNested(subcolumnData, schema, depth = 0) {
|
||||
const nextDepth = optional ? depth + 1 : depth
|
||||
|
||||
if (isListLike(schema)) {
|
||||
const sublist = schema.children[0].children[0]
|
||||
assembleNested(subcolumnData, sublist, nextDepth + 1)
|
||||
let sublist = schema.children[0]
|
||||
let subDepth = nextDepth
|
||||
if (sublist.children.length === 1) {
|
||||
sublist = sublist.children[0]
|
||||
subDepth++
|
||||
}
|
||||
assembleNested(subcolumnData, sublist, subDepth)
|
||||
|
||||
const subcolumn = sublist.path.join('.')
|
||||
const values = subcolumnData.get(subcolumn)
|
||||
|
||||
38
test/files/adam_genotypes.json
Normal file
38
test/files/adam_genotypes.json
Normal file
@ -0,0 +1,38 @@
|
||||
[
|
||||
[
|
||||
{
|
||||
"alternateAllele": null,
|
||||
"end": null,
|
||||
"filtersApplied": null,
|
||||
"filtersFailed": null,
|
||||
"filtersPassed": null,
|
||||
"names": ["name"],
|
||||
"quality": null,
|
||||
"referenceAllele": null,
|
||||
"referenceName": null,
|
||||
"splitFromMultiAllelic": false,
|
||||
"start": null
|
||||
},
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
false,
|
||||
false,
|
||||
null,
|
||||
null
|
||||
]
|
||||
]
|
||||
4043
test/files/adam_genotypes.metadata.json
Normal file
4043
test/files/adam_genotypes.metadata.json
Normal file
File diff suppressed because one or more lines are too long
BIN
test/files/adam_genotypes.parquet
Normal file
BIN
test/files/adam_genotypes.parquet
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user