jetstreamapp / soql-parser-js

Javascript SOQL parser
https://jetstreamapp.github.io/soql-parser-js/
MIT License
77 stars 20 forks source link

getFlattenedFields does not return accurate resulte when nested aggregate function #157

Closed paustint closed 3 years ago

paustint commented 3 years ago

Description

If an aggregate function is nested within a FORMAT() call, getFlattenedFields does not return the correct field value.

SELECT COUNT(Id), FORMAT(MAX(CreatedDate)), Email
FROM Contact
GROUP BY Email
HAVING COUNT(Id) >= 0

CreatedDate is returned when it should actually be expr1