code: public static DictionaryProvider providerForVectors(List<FieldVector> vectors,List<Field> fields) {
          Dictionary[] dictionaries = new Dictionary[vectors.size()];
          for(int i = 0; i < vectors.size(); i++) {
              DictionaryEncoding dictionary = fields.get(i).getDictionary();
              if(dictionary == null) {
                  dictionary = new DictionaryEncoding(i,true,null);
              }
              dictionaries[i] = new Dictionary(vectors.get(i), dictionary);
          }
          return  new DictionaryProvider.MapDictionaryProvider(dictionaries);
      }
docs: Provide a value look up dictionary based on the
  given set of input {@link FieldVector} s for
  reading and writing to arrow streams
  @param vectors the vectors to use as a lookup
  @return the associated {@link DictionaryProvider} for the given
  input {@link FieldVector} list