Skip to content

Commit 4fb5ae2

Browse files
committed
Update ReaderProjectionsAdapter parameters
Annotate nullable fields with the @nullable annotation and allow for any ColumnHandle implementation.
1 parent a2a9ffe commit 4fb5ae2

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

plugin/trino-hive/src/main/java/io/trino/plugin/hive/ReaderProjectionsAdapter.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
import io.trino.spi.connector.ColumnHandle;
2525
import io.trino.spi.type.Type;
2626

27+
import javax.annotation.Nullable;
28+
2729
import java.util.List;
2830

2931
import static com.google.common.base.Preconditions.checkArgument;
@@ -39,7 +41,7 @@ public class ReaderProjectionsAdapter
3941
private final List<Type> inputTypes;
4042

4143
public ReaderProjectionsAdapter(
42-
List<ColumnHandle> expectedColumns,
44+
List<? extends ColumnHandle> expectedColumns,
4345
ReaderColumns readColumns,
4446
ColumnTypeGetter typeGetter,
4547
ProjectionGetter projectionGetter)
@@ -68,7 +70,8 @@ public ReaderProjectionsAdapter(
6870
.collect(toImmutableList());
6971
}
7072

71-
public Page adaptPage(Page input)
73+
@Nullable
74+
public Page adaptPage(@Nullable Page input)
7275
{
7376
if (input == null) {
7477
return null;

0 commit comments

Comments
 (0)