diff --git a/docs/changelog/128960.yaml b/docs/changelog/128960.yaml new file mode 100644 index 0000000000000..3721b34894548 --- /dev/null +++ b/docs/changelog/128960.yaml @@ -0,0 +1,5 @@ +pr: 128960 +summary: Throw ISE instead of IAE for illegal block in page +area: ES|QL +type: bug +issues: [] diff --git a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/data/Page.java b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/data/Page.java index 2e46735bd5bd1..59dae4ade25e8 100644 --- a/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/data/Page.java +++ b/x-pack/plugin/esql/compute/src/main/java/org/elasticsearch/compute/data/Page.java @@ -83,7 +83,7 @@ private Page(boolean copyBlocks, int positionCount, Block[] blocks) { private Page(Page prev, Block[] toAdd) { for (Block block : toAdd) { if (prev.positionCount != block.getPositionCount()) { - throw new IllegalArgumentException( + throw new IllegalStateException( "Block [" + block + "] does not have same position count: " + block.getPositionCount() + " != " + prev.positionCount ); }