ElasticSearch Sql aggregation query bugs with SUM function

HI there,

Sql query is a very fantastic tool offered by EL 7.3. However i cant explain that bug :

When i use SUM with Match , 1 condition, query below works well

POST _xpack/sql?format=txt
{
"query":"SELECT SUM(FlightTimeHour) Avg_Flight_Time FROM flights where MATCH(OriginCountry,'AE') "
}

But if i use 2 or more conditions, SUM and MATCH query below fails :

POST _xpack/sql?format=txt
{
"query":"SELECT SUM(FlightTimeHour) Avg_Flight_Time FROM flights where MATCH(OriginCountry,'AE') OR MATCH(OriginCountry,'FR') "
}

Can someone tell me what is wrong ?

Hi @Johna,
Sorry for replying late. Indeed, this is a bug and I just created https://github.com/elastic/elasticsearch/issues/47365 to track its progress.

Hi there,

is there a solution for my problem?

Thanks in advance

Hi @Johna,
The bug that I raised has been fixed. It should be available in the next 7.4.1 release.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.