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

Add check for Non-Numeric/Invalid Entries in Aggregate (of Attributes) Functions (sum/avg) #97

Merged

Conversation

TobiUUlm
Copy link
Collaborator

@TobiUUlm TobiUUlm commented Oct 6, 2023

fixes #80
Sample for testing:

features
    Bike
        optional
            Front {Weight 2}
            Back {Weight 1.5}
            Dynamo {Weight 3, Manufacturer 'sample'}
constraints
    avg(Weight) > 0
    avg(invalidattr) > 0
    avg(Manufacturer) > 0
    sum(Weight) > 0
    sum(invalidattr) > 0
    sum(Manufacturer) > 0

@TobiUUlm TobiUUlm changed the title add attribute type checking to aggregate functions Add check for Non-Numeric/Invalid Entries in Aggregate (of Attributes) Functions (sum/avg) Oct 6, 2023
@TobiUUlm TobiUUlm requested a review from felixrieg October 10, 2023 10:50
@felixrieg
Copy link
Collaborator

LGTM

When using a attribute from an imported uvl file I still get the error message.
But since this is also the behavior on main, maybe this is a separate issue

@SundermannC SundermannC merged commit 61ed8d3 into Universal-Variability-Language:master Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Non-Numeric Entries Are Always Considered as Zero in Sums
3 participants