Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions Sources/SparkConnect/ArrowReader.swift
Original file line number Diff line number Diff line change
Expand Up @@ -201,12 +201,15 @@ public class ArrowReader { // swiftlint:disable:this type_body_length
)
-> Result<ArrowArrayHolder, ArrowError>
{
if isNestedType(field.typeType) {
switch field.typeType {
case .struct_:
return loadStructData(loadInfo, field: field)
} else if isFixedPrimitive(field.typeType) {
return loadPrimitiveData(loadInfo, field: field)
} else {
return loadVariableData(loadInfo, field: field)
default:
if isFixedPrimitive(field.typeType) {
return loadPrimitiveData(loadInfo, field: field)
} else {
return loadVariableData(loadInfo, field: field)
}
}
}

Expand Down
9 changes: 0 additions & 9 deletions Sources/SparkConnect/ArrowReaderHelper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,6 @@ func isFixedPrimitive(_ type: org_apache_arrow_flatbuf_Type_) -> Bool {
}
}

func isNestedType(_ type: org_apache_arrow_flatbuf_Type_) -> Bool {
switch type {
case .struct_:
return true
default:
return false
}
}

func findArrowType( // swiftlint:disable:this cyclomatic_complexity function_body_length
_ field: org_apache_arrow_flatbuf_Field
) -> ArrowType {
Expand Down
Loading