Skip to content

Bug in Aggregate Records Node with Filtering #14

Description

@theMeysam

I am experiencing an issue with the Aggregate Records node in Noodl. It seems that the node may have a bug when applying filters, as the expected aggregation results (e.g., Sum, Avg) are not being calculated correctly or the node fails to process the data as intended.
Steps to Reproduce:

Add an Aggregate Records node to the project.
Connect it to a Query Records node that fetches data from the campaignAssignment collection with a filter (e.g., where({ campaignId: { equalTo: "PN14JX4XfA" }, status: { equalTo: "approved" } })).
Set the aggregation type to Sum and select the agreedPrice property.
Run the project and observe the Result output.

Expected Behavior:
The node should return the correct sum of agreedPrice for the filtered records (125 for a single record with that value).
Actual Behavior:
The Result output is either incorrect ( 250). In some cases, it seems to ignore the filter conditions.
Additional Information:

Noodl Version: 1.1.0
Operating System: Windows 11
Number of Records: ~1000 records in campaignAssignment
Steps tried: restarted Noodl, reconnected the nodes, checked data types

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions