private static Map < MaterializedViewInfo , Table > getMviAndViews ( List < Table > tbls ) { return tbls . stream ( ) . flatMap ( tbl -> StreamSupport . stream ( ( ( Iterable < MaterializedViewInfo > ) ( ) -> tbl . getViews ( ) . iterator ( ) ) . spliterator ( ) , false ) . map ( mv -> Pair . of ( mv , mv . getDest ( ) ) ) ) . collect ( Collectors . toMap ( Pair :: getFirst , Pair :: getSecond ) ) ; }
returns all materialized view info = > view table from table list