Assuming this is how you create your list:
List<Set<String>> keysQuery = listExtractQglobal.parallelStream()
.map(m -> m.keySet()).distinct().collect(Collectors.toList());
you can actually avoid unnecessary collecting to a list and collect to a set instead:
Set<String> keysQuery = listExtractQglobal.parallelStream()
.map(Map::keySet)
.distinct()
.flatMap(Collection::stream)
.collect(Collectors.toSet());
Btw, I'm not sure why do you need the distinct here. Are you looking for distinct sets or distinct keys among all key sets? In latter case you could simply omit the distinct(), since the resulting Set contains distinct values by definition:
Set<String> keysQuery = listExtractQglobal.parallelStream()
.map(Map::keySet)
.flatMap(Collection::stream)
.collect(Collectors.toSet());
listExtractQglobalvariable?