jetstreamapp / soql-parser-js

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

getFlattenedFields does not correctly handle alias for grouped expressions #131

Closed paustint closed 3 years ago

paustint commented 3 years ago

Description

SELECT AccountId, MAX(Account.CreatedDate) AcctCreatedDate
FROM Contact
GROUP BY AccountId

Actual:

['AccountId', 'Account.CreatedDate']

Expected:

['AccountId', 'AcctCreatedDate']

Salesforce Query Result

{
  "attributes": {
    "type": "AggregateResult"
  },
  "AccountId": "0016g00000ETu0MAAT",
  "AcctCreatedDate": "2020-02-28T03:00:31.000+0000"
}
paustint commented 3 years ago

resolved by 92bd9e17593eec3e08d784996a67a4e05a0b5f51