Description
Adding maxRows:1 to the yaml test keeps returning two rows forever (the result row and an empty row), the continuation is never atEnd().
Steps To Reproduce:
- For example, in the test aggregate-index-tests.yamsql, modify the test to be:
-
- query: select max(col2) from T1 use index (mv8); - maxRows: 1 - explain: "ISCAN(MV8 <,>) | MAP (_ AS _0) | AGG (max_l(_._0.COL2) AS _0) | ON EMPTY NULL | MAP (_._0._0 AS _0)" - result: [{!l 13}] - result: [{!null _}] - result: [{!l 13}] - result: [{!null _}] - result: [{!l 13}] - result: [{!null _}] - result: [{!l 13}] - result: [{!null _}]
- And the test will always fail with “Query returned more results, but no more were expected after line …”
Note that this behaves differently when running in mixed mode, where the error is:
Caused by: com.google.common.base.VerifyException
at com.google.common.base.Verify.verify(Verify.java:102)
at com.apple.foundationdb.relational.recordlayer.query.QueryPlan$ContinuedPhysicalQueryPlan.validatePlanAgainstEnvironment(QueryPlan.java:520)
at com.apple.foundationdb.relational.recordlayer.query.QueryPlan$PhysicalQueryPlan.executePhysicalPlan(QueryPlan.java:361)
at com.apple.foundationdb.relational.recordlayer.query.QueryPlan$PhysicalQueryPlan.executeInternal(QueryPlan.java:252)
at com.apple.foundationdb.relational.recordlayer.query.QueryPlan$PhysicalQueryPlan.executeInternal(QueryPlan.java:112)