Skip to content

ESQL: INLINESTATS wrongly applies the after-LIMIT command to the right hand side agg #133235

@astefan

Description

@astefan

Description

FROM employees | INLINESTATS a = avg(salary) | LIMIT 1 | KEEP a

results in:

       a       
---------------
57305.0        

while

FROM employees | STATS a = avg(salary) | LIMIT 1 | KEEP a

results in:

       a       
---------------
48248.55       

This is likely because the limit is wrongly pushed down:

FROM employees | INLINESTATS a = avg(salary) | LIMIT 1 | KEEP a, emp_no, salary
results in

       a       |    emp_no     |    salary     
---------------+---------------+---------------
57305.0        |10001          |57305          

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions