Skip to content

Infinite continuations: sum(*) returns alternating rows forever #3096

Closed
@ohadzeliger

Description

@ohadzeliger

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:

  1. For example, in the test aggregate-index-tests.yamsql, modify the test to be:
  2.    - 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 _}]
    
  3. 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)

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtest failureA test is failing at least some of the time

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions