Skip to content

Commit 6fe187a

Browse files
committed
Relax validation for empty pages in PageValidations
1 parent 81f8713 commit 6fe187a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

core/trino-main/src/main/java/io/trino/split/PageValidations.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,11 @@ private PageValidations() {}
3232

3333
public static void validateOutputPageTypes(SourcePage page, List<Type> expectedTypes, Supplier<String> debugContextSupplier)
3434
{
35+
if (page.getPositionCount() == 0 && page.getChannelCount() == 0) {
36+
// allow empty pages without blocks
37+
return;
38+
}
39+
3540
if (page.getChannelCount() != expectedTypes.size()) {
3641
throw new TrinoException(
3742
GENERIC_INTERNAL_ERROR,

0 commit comments

Comments
 (0)