Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Date functions should have isAggregateFn set to true #228

Closed
1 of 2 tasks
paustint opened this issue Apr 9, 2023 · 0 comments · Fixed by #229
Closed
1 of 2 tasks

Date functions should have isAggregateFn set to true #228

paustint opened this issue Apr 9, 2023 · 0 comments · Fixed by #229
Labels
bug Something isn't working

Comments

@paustint
Copy link
Collaborator

paustint commented Apr 9, 2023

  • Feature
  • Bug

Description

Date functions should have isAggregateFn set to true

As a result, the incorrect results are returned from getFlattenedFields.

SELECT HOUR_IN_DAY(CreatedDate), SUM(Amount)
FROM Opportunity
GROUP BY HOUR_IN_DAY(convertTimezone(CreatedDate))
[
    {
        "name": "CreatedDate",
        "key": "CreatedDate",
        "cellClass": "slds-truncate",
        "resizable": true,
        "sortable": true,
        "width": 200,
        "filters": [
            "TEXT",
            "SET"
        ]
    },
    {
        "name": "expr0",
        "key": "expr0",
        "cellClass": "slds-truncate",
        "resizable": true,
        "sortable": true,
        "width": 200,
        "filters": [
            "TEXT",
            "SET"
        ]
    }
]

image

@paustint paustint added the bug Something isn't working label Apr 9, 2023
paustint added a commit that referenced this issue Apr 9, 2023

Unverified

No user is associated with the committer email.
Date functions are considered as aggregate functions from salesforce, so this fixes a bug to ensure we match behavior.

resolves #228
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant