Why the Max aggregate function need the limit condition

When i write a comparion operator use the Max aggregate function,like this:

select * from A where A.fieldX >= (select max(fieldX) from A)

but dremio response a errror:

  Dremio doesn't currently support non-scalar sub-queries used in an expression

And,when i add the limit condition,it is normal.

select * from A where A.fieldX >= (select max(fieldX) from A limit 1)

WHY???

@knocher That is a known behavior and you exactly found the right workaround, we have an engineering ticket in the backlog to address this but the workaround should be fine

This issue has been addressed as of Dremio 16.1. If you are seeing this in 16.1 or higher, please share your query profile, as this is not expected.