Skip to content

ES|QL "ROW a=null | SORT a" crashes with AssertionError #121535

@jan-elastic

Description

@jan-elastic

Elasticsearch Version

9.0.0

Installed Plugins

No response

Java Version

n/a

OS Version

n/a

Problem Description

Executing the ES|QL command

ROW a=null | SORT a

crashes on main with the following assertion error:

[2025-02-03T15:33:10,801][ERROR][o.e.b.ElasticsearchUncaughtExceptionHandler] [runTask-0] fatal error in thread [elasticsearch[runTask-0][search][T#1]], exiting java.lang.AssertionError: estimated row size [0] wasn't set
	at org.elasticsearch.xpack.esql.planner.LocalExecutionPlanner.planTopN(LocalExecutionPlanner.java:362)
(...)

Note: this doesn't occur in production, because assertions are disabled.

Steps to Reproduce

spin up ES, Kibana, go to discover, ES|QL mode, enter "ROW a=null | SORT a"

Logs (if relevant)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions