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

Sum, max, min null value fix on non numeric column #1537

Merged
merged 7 commits into from
Dec 3, 2022

Conversation

gangadhargo
Copy link
Contributor

Hi @mathiasrw

I tried to fix the following issues please verify and suggest if any changes are required.

#1533
#1532
#1531

@mathiasrw
Copy link
Member

Thank you!

@mathiasrw
Copy link
Member

I added a few more details to the test. Unfortunately its not unfolding as expected.

@gangadhargo
Copy link
Contributor Author

Thanks, sure I am reverifying.

@gangadhargo
Copy link
Contributor Author

Hi @mathiasrw - Sorry, I need some help understanding the code. as i am new to the code base. I tried debugging and the below query.groupfn gives output.
In dojoin.js
query.groupfn(scope, query.params, alasql);
how is the above line resolving the output? where is the actual code which compares the input and gives the result? I want to keep validation there. And keeping validations after output doesn't make sense which I did in my initial commit.

let's say we are doing SUM where is the given input values of sum happening in the code.

@gangadhargo
Copy link
Contributor Author

Hi @mathiasrw,

I am able to figure out the code and fix the issue. Please ignore the above comment

Thanks,
Gangadhar.

@mathiasrw
Copy link
Member

@gangadhargo So happy to hear that. Sorry that my response time has been so long.

@gangadhargo
Copy link
Contributor Author

@mathiasrw No worries. I have almost fixed it. only one regression test failed. I am debugging it.

@mathiasrw
Copy link
Member

Very impressive

@mathiasrw mathiasrw changed the title sum, max, min null value fix on non numeric column Sum, max, min null value fix on non numeric column Dec 3, 2022
@mathiasrw mathiasrw merged commit 7e87d66 into AlaSQL:develop Dec 3, 2022
@mathiasrw
Copy link
Member

Released as part of v2.2.0

@unpete
Copy link

unpete commented Dec 6, 2022

alasql('select sum(v) from ?', [[{v: 0}]]) returns [{v: null}] expected [{v: 0}]

@mathiasrw
Copy link
Member

@unpete Thank you for this input!

Its very critical.

@gangadhargo Are you able to take a look at this right away? If not I might need to roll the change back and release again. This will break lots of things.

Ill add this to the test in your branch

@mathiasrw
Copy link
Member

I made a PR to your branch @gangadhargo gangadhargo#1 pull it in, and make a new PR to develop for this

@mathiasrw
Copy link
Member

mathiasrw commented Dec 6, 2022

Reverting as this has created a breaking change. Lest work together in #1553 to solve this.

The reverted version is now out as v2.2.1

mathiasrw added a commit that referenced this pull request Dec 6, 2022
@gangadhargo
Copy link
Contributor Author

sorry guys it was missed. Thanks, @unpete for pointing out this case. @mathiasrw I will work on this

@mathiasrw
Copy link
Member

mathiasrw commented Dec 7, 2022

Thank you @gangadhargo

Please start by merging gangadhargo#1 into your repo - and then make a new PR to this branch from yours referring to fixing #1553

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.

3 participants