Polishing.

Update java doc and add issue references to tests.

Original Pull Request: #3858
This commit is contained in:
Christoph Strobl
2022-01-20 16:11:52 +01:00
parent 54f098a906
commit 31f640a398
3 changed files with 12 additions and 10 deletions

View File

@@ -799,12 +799,12 @@ public class ArithmeticOperators {
public Cosh cosh(AngularUnit unit) {
return usesFieldRef() ? Cosh.coshOf(fieldReference, unit) : Cosh.coshOf(expression, unit);
}
/**
* Creates new {@link AggregationExpression} that calculates the inverse cosine of a numeric value.
*
* @return new instance of {@link ACos}.
* @since 3.3
* @since 3.4
*/
public ACos acos() {
return usesFieldRef() ? ACos.acosOf(fieldReference) : ACos.acosOf(expression);
@@ -814,7 +814,7 @@ public class ArithmeticOperators {
* Creates new {@link AggregationExpression} that calculates the inverse hyperbolic cosine of a numeric value.
*
* @return new instance of {@link ACosh}.
* @since 3.3
* @since 3.4
*/
public ACosh acosh() {
return usesFieldRef() ? ACosh.acoshOf(fieldReference) : ACosh.acoshOf(expression);
@@ -2482,7 +2482,6 @@ public class ArithmeticOperators {
}
}
/**
* An {@link AggregationExpression expression} that calculates the cosine of a value that is measured in radians.
*
@@ -2684,10 +2683,12 @@ public class ArithmeticOperators {
return "$cosh";
}
}
/**
* An {@link AggregationExpression expression} that calculates the inverse cosine of a value.
*
* @author Divya Srivastava
* @since 3.4
*/
public static class ACos extends AbstractAggregationExpression {
@@ -2736,8 +2737,10 @@ public class ArithmeticOperators {
}
/**
* An {@link AggregationExpression expression} that calculates the inverse hyperbolic cosine of a value
* An {@link AggregationExpression expression} that calculates the inverse hyperbolic cosine of a value.
*
* @author Divya Srivastava
* @since 3.4
*/
public static class ACosh extends AbstractAggregationExpression {
@@ -2972,7 +2975,6 @@ public class ArithmeticOperators {
return new ATan2((Collections.singletonList(expression)));
}
/**
* Creates a new {@link AggregationExpression} that calculates the inverse tangent of of y / x, where y and x are
* the first and second values passed to the expression respectively.

View File

@@ -139,12 +139,12 @@ class ArithmeticOperatorsUnitTests {
assertThat(valueOf("angle").cosh().toDocument(Aggregation.DEFAULT_CONTEXT)).isEqualTo("{ $cosh : \"$angle\" }");
}
@Test
@Test // GH-3707
void rendersACos() {
assertThat(valueOf("field").acos().toDocument(Aggregation.DEFAULT_CONTEXT)).isEqualTo("{ $acos : \"$field\" }");
}
@Test
@Test // GH-3707
void rendersACosh() {
assertThat(valueOf("field").acosh().toDocument(Aggregation.DEFAULT_CONTEXT)).isEqualTo("{ $acosh : \"$field\" }");
}

View File

@@ -85,7 +85,7 @@ At the time of this writing, we provide support for the following Aggregation Op
| `addToSet`, `covariancePop`, `covarianceSamp`, `expMovingAvg`, `first`, `last`, `max`, `min`, `avg`, `push`, `sum`, `count` (+++*+++), `stdDevPop`, `stdDevSamp`
| Arithmetic Aggregation Operators
| `abs`, `add` (+++*+++ via `plus`), `asin`, `asin`, `atan`, `atan2`, `atanh`, `ceil`, `cos`, `cosh`, `derivative`, `divide`, `exp`, `floor`, `integral`, `ln`, `log`, `log10`, `mod`, `multiply`, `pow`, `round`, `sqrt`, `subtract` (+++*+++ via `minus`), `sin`, `sinh`, `tan`, `tanh`, `trunc`
| `abs`, `acos`, `acosh`, `add` (+++*+++ via `plus`), `asin`, `asin`, `atan`, `atan2`, `atanh`, `ceil`, `cos`, `cosh`, `derivative`, `divide`, `exp`, `floor`, `integral`, `ln`, `log`, `log10`, `mod`, `multiply`, `pow`, `round`, `sqrt`, `subtract` (+++*+++ via `minus`), `sin`, `sinh`, `tan`, `tanh`, `trunc`
| String Aggregation Operators
| `concat`, `substr`, `toLower`, `toUpper`, `strcasecmp`, `indexOfBytes`, `indexOfCP`, `regexFind`, `regexFindAll`, `regexMatch`, `split`, `strLenBytes`, `strLenCP`, `substrCP`, `trim`, `ltrim`, `rtim`