File tree Expand file tree Collapse file tree 1 file changed +4
-11
lines changed
core/trino-main/src/main/java/io/trino/connector/informationschema Expand file tree Collapse file tree 1 file changed +4
-11
lines changed Original file line number Diff line number Diff line change 2222import io .trino .security .AccessControl ;
2323import io .trino .spi .Page ;
2424import io .trino .spi .PageBuilder ;
25- import io .trino .spi .block .Block ;
2625import io .trino .spi .connector .ColumnHandle ;
2726import io .trino .spi .connector .ColumnMetadata ;
2827import io .trino .spi .connector .ConnectorPageSource ;
@@ -141,18 +140,12 @@ public InformationSchemaPageSource(
141140 .boxed ()
142141 .collect (toImmutableMap (i -> columnMetadata .get (i ).getName (), Function .identity ()));
143142
144- List < Integer > channels = columns .stream ()
143+ int [] channels = columns .stream ()
145144 .map (columnHandle -> (InformationSchemaColumnHandle ) columnHandle )
146- .map (columnHandle -> columnNameToChannel .get (columnHandle .columnName ()))
147- .collect ( toImmutableList () );
145+ .mapToInt (columnHandle -> columnNameToChannel .get (columnHandle .columnName ()))
146+ .toArray ( );
148147
149- projection = page -> {
150- Block [] blocks = new Block [channels .size ()];
151- for (int i = 0 ; i < blocks .length ; i ++) {
152- blocks [i ] = page .getBlock (channels .get (i ));
153- }
154- return new Page (page .getPositionCount (), blocks );
155- };
148+ projection = page -> page .getColumns (channels );
156149 }
157150
158151 @ Override
You can’t perform that action at this time.
0 commit comments