Skip to main content

Posts

Showing posts from July, 2022

Java stream filter with map and distinct

OptimizeMixedDistinctAggregations$AggregateInfo.getOriginalNonDistinctAggregateArgs() public List getOriginalNonDistinctAggregateArgs() { return aggregations.values().stream() .filter(aggregation -> !aggregation.getMask().isPresent()) .map(Aggregation::getCall) .flatMap(function -> function.getArguments().stream()) .distinct() .map(Symbol::from) .collect(Collectors.toList()); }