Skip to content

Patch averageif#330

Closed
sfisque wants to merge 3 commits intoapache:trunkfrom
sfisque:patch-averageif
Closed

Patch averageif#330
sfisque wants to merge 3 commits intoapache:trunkfrom
sfisque:patch-averageif

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
Member

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
Member

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
Member

@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
Member

could you cover example2 from M$ too?

@pjfanning
Copy link
Member

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
Member

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
Member

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
Member

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
Member

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

Development

Successfully merging this pull request may close these issues.

4 participants