jetstreamapp/soql-parser-js

getFlattenedFields does not correctly handle alias for grouped expressions

paustint opened this issue · 1 comments

  • Feature
  • Bug

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"
}

resolved by 92bd9e1