nestedDictionaryTypes function

List<ArrowDictionaryType> nestedDictionaryTypes(
  1. ArrowDataType type
)

The dictionary types strictly inside type, in ArrowArray.nestedDictionaries order.

Implementation

List<ArrowDictionaryType> nestedDictionaryTypes(ArrowDataType type) {
  final out = <ArrowDictionaryType>[];
  final storage = _unwrapExtension(type);
  if (storage is ArrowDictionaryType) {
    _collectDictionaries(storage.valueType, out);
  } else {
    for (final child in _childTypes(storage)) {
      _collectDictionaries(child, out);
    }
  }
  return out;
}