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

Patch averageif #330

Closed
wants to merge 3 commits into from
Closed

Patch averageif #330

wants to merge 3 commits into from

Conversation

sfisque
Copy link

@sfisque sfisque commented Apr 29, 2022

adds missing support for singular AverageIf function

*/
public class AverageIf
extends Baseifs
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We try to follow a code-style where brackets are on the previous line, can you re-format this class to follow that, also "extends" is usually on the same line as the class, i.e.

public class AverageIf extends Baseifs {

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok. i've never been a fan of K&R formatting, but i can make that change.


/**
* Example 1 from
* https://support.microsoft.com/en-us/office/maxifs-function-dfd611e6-da2c-488a-919b-9b6376b28883
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this link be https://support.microsoft.com/en-us/office/averageif-function-faec8e2e-0dec-4308-af69-f5576d8ac642 ? the test data does not match either of the examples on that doc page though

Copy link
Author

@sfisque sfisque Apr 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes. the danger of cut/paste coding (i stole the UT from averageifs) for expedience. i can make the change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you use the examples from https://support.microsoft.com/en-us/office/averageif-function-faec8e2e-0dec-4308-af69-f5576d8ac642 though - ie the data and test scenarios?

Copy link
Contributor

@pjfanning pjfanning Apr 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the M$ examples are rubbish - very focused on a small number of happy path cases and occasionally an exception case but at least using them as a guide is better than ignoring them and focusing a use case that suits you and maybe noone else

@pjfanning
Copy link
Contributor

could you cover example2 from M$ too?

@pjfanning
Copy link
Contributor

and you ignored the review comment asking you to respect the code format

@sfisque-synodex
Copy link

ok. but i'm not aware of "ignoring" the code format request. i moved all the braces and other bits.

@pjfanning
Copy link
Contributor

pjfanning commented Apr 29, 2022

I've merged what you've done so far after reformatting the code but with example2 being tested, the new code is suspect and liable for removal - 8a0d0d7

@sfisque-synodex
Copy link

i was in the process of adding ex.2 to the test. should i continue?

@pjfanning
Copy link
Contributor

new code is incorrect - I have provided a pull request to your repo - if the example2 is left broken, i will remove all the new code

@pjfanning
Copy link
Contributor

Can you close this PR? - all this code is merged to Apache trunk and I have been fixing your bugs and code formatting issues.

@sfisque-synodex
Copy link

i do not appear to have that privilege. i cannot find the close button. you have my permission to close it if you have that privilege.

@pjfanning
Copy link
Contributor

I don't have a direct way to close this. I have un ugly way to close it but may avoid it. It's more important that you verify the apache poi trunk code to verify it works for you.

@sfisque sfisque closed this Apr 29, 2022
@sfisque
Copy link
Author

sfisque commented Apr 29, 2022

no worries, i forgot that i forked it under a different user-id. closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants