-
Notifications
You must be signed in to change notification settings - Fork 24.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ESQL: Paginate MV_EXPAND output #100598
ESQL: Paginate MV_EXPAND output #100598
Changes from 5 commits
72b8ff7
74393f9
791f875
09b1577
4333f72
652875a
913d0e7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,12 +16,12 @@ | |
|
||
public class MvExpandOperatorStatusTests extends AbstractWireSerializingTestCase<MvExpandOperator.Status> { | ||
public static MvExpandOperator.Status simple() { | ||
return new MvExpandOperator.Status(10, 9); | ||
return new MvExpandOperator.Status(10, 15, 9); | ||
} | ||
|
||
public static String simpleToJson() { | ||
return """ | ||
{"pages_processed":10,"noops":9}"""; | ||
{"pages_in":10,"pages_out":15,"noops":9}"""; | ||
} | ||
|
||
public void testToXContent() { | ||
|
@@ -35,20 +35,22 @@ protected Writeable.Reader<MvExpandOperator.Status> instanceReader() { | |
|
||
@Override | ||
public MvExpandOperator.Status createTestInstance() { | ||
return new MvExpandOperator.Status(randomNonNegativeInt(), randomNonNegativeInt()); | ||
return new MvExpandOperator.Status(randomNonNegativeInt(), randomNonNegativeInt(), randomNonNegativeInt()); | ||
} | ||
|
||
@Override | ||
protected MvExpandOperator.Status mutateInstance(MvExpandOperator.Status instance) { | ||
switch (between(0, 1)) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should change to There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Makes sense, doing it now |
||
case 0: | ||
return new MvExpandOperator.Status( | ||
randomValueOtherThan(instance.pagesProcessed(), ESTestCase::randomNonNegativeInt), | ||
randomValueOtherThan(instance.pagesIn(), ESTestCase::randomNonNegativeInt), | ||
randomValueOtherThan(instance.pagesOut(), ESTestCase::randomNonNegativeInt), | ||
instance.noops() | ||
); | ||
case 1: | ||
return new MvExpandOperator.Status( | ||
instance.pagesProcessed(), | ||
instance.pagesIn(), | ||
instance.pagesOut(), | ||
randomValueOtherThan(instance.noops(), ESTestCase::randomNonNegativeInt) | ||
); | ||
default: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth comments about the meanings of these two arms. I think one is "we're done expanding this page" and another is "we've filled the page we're building and maybe exhausted the current position. But we might not have, we might be half way through expanding a position.