Polishing.
Add since and author tags. Update reference docs. Fix format of ticket references in tests. See #3708 Original pull request: #3796.
This commit is contained in:
@@ -739,20 +739,22 @@ public class ArithmeticOperators {
|
||||
* Creates new {@link AggregationExpression} that calculates the inverse sine of a numeric value.
|
||||
*
|
||||
* @return new instance of {@link ASin}.
|
||||
* @since 3.3
|
||||
*/
|
||||
public ASin asin() {
|
||||
return usesFieldRef() ? ASin.asinOf(fieldReference) : ASin.asinOf(expression);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates new {@link AggregationExpression} that calculates the inverse hyperbolic sine of a numeric value.
|
||||
*
|
||||
* @return new instance of {@link ASinh}.
|
||||
* @since 3.3
|
||||
*/
|
||||
public ASinh asinh() {
|
||||
return usesFieldRef() ? ASinh.asinhOf(fieldReference) : ASinh.asinhOf(expression);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Creates new {@link AggregationExpression} that calculates the cosine of a numeric value given in
|
||||
* {@link AngularUnit#RADIANS radians}.
|
||||
@@ -2357,10 +2359,12 @@ public class ArithmeticOperators {
|
||||
return "$sinh";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* An {@link AggregationExpression expression} that calculates the inverse sine of a value.
|
||||
*
|
||||
* @author Divya Srivastava
|
||||
* @since 3.3
|
||||
*/
|
||||
public static class ASin extends AbstractAggregationExpression {
|
||||
|
||||
@@ -2407,9 +2411,12 @@ public class ArithmeticOperators {
|
||||
return "$asin";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* An {@link AggregationExpression expression} that calculates the inverse hyperbolic sine of a value
|
||||
*
|
||||
* @author Divya Srivastava
|
||||
* @since 3.3
|
||||
*/
|
||||
public static class ASinh extends AbstractAggregationExpression {
|
||||
|
||||
@@ -2430,7 +2437,7 @@ public class ArithmeticOperators {
|
||||
/**
|
||||
* Creates a new {@link AggregationExpression} that calculates the inverse hyperbolic sine of a value.
|
||||
* <p />
|
||||
*
|
||||
*
|
||||
* @param expression the {@link AggregationExpression expression} that resolves to a numeric value.
|
||||
* @return new instance of {@link ASinh}.
|
||||
*/
|
||||
@@ -2884,7 +2891,6 @@ public class ArithmeticOperators {
|
||||
* @return new instance of {@link ATan2}.
|
||||
*/
|
||||
public ATan2 atan2of(Number value) {
|
||||
|
||||
return new ATan2(append(value));
|
||||
}
|
||||
|
||||
|
||||
@@ -109,19 +109,15 @@ class ArithmeticOperatorsUnitTests {
|
||||
assertThat(valueOf("angle").sinh(AngularUnit.DEGREES).toDocument(Aggregation.DEFAULT_CONTEXT))
|
||||
.isEqualTo("{ $sinh : { $degreesToRadians : \"$angle\" } }");
|
||||
}
|
||||
|
||||
@Test // DATAMONGO - 3708
|
||||
|
||||
@Test // GH-3708
|
||||
void rendersASin() {
|
||||
|
||||
assertThat(valueOf("field").asin().toDocument(Aggregation.DEFAULT_CONTEXT))
|
||||
.isEqualTo("{ $asin : \"$field\" }");
|
||||
assertThat(valueOf("field").asin().toDocument(Aggregation.DEFAULT_CONTEXT)).isEqualTo("{ $asin : \"$field\" }");
|
||||
}
|
||||
|
||||
@Test // DATAMONGO - 3708
|
||||
void rendersASinh() {
|
||||
|
||||
assertThat(valueOf("field").asinh().toDocument(Aggregation.DEFAULT_CONTEXT))
|
||||
.isEqualTo("{ $asinh : \"$field\" }");
|
||||
@Test // GH-3708
|
||||
void rendersASinh() {
|
||||
assertThat(valueOf("field").asinh().toDocument(Aggregation.DEFAULT_CONTEXT)).isEqualTo("{ $asinh : \"$field\" }");
|
||||
}
|
||||
|
||||
@Test // GH-3710
|
||||
|
||||
@@ -1078,13 +1078,13 @@ public class SpelExpressionTransformerUnitTests {
|
||||
void shouldRenderSinh() {
|
||||
assertThat(transform("sinh(angle)")).isEqualTo("{ \"$sinh\" : \"$angle\"}");
|
||||
}
|
||||
|
||||
@Test // DATAMONGO-3708
|
||||
|
||||
@Test // GH-3708
|
||||
void shouldRenderASin() {
|
||||
assertThat(transform("asin(number)")).isEqualTo("{ \"$asin\" : \"$number\"}");
|
||||
}
|
||||
|
||||
@Test // DATAMONGO-3708
|
||||
@Test // GH-3708
|
||||
void shouldRenderASinh() {
|
||||
assertThat(transform("asinh(number)")).isEqualTo("{ \"$asinh\" : \"$number\"}");
|
||||
}
|
||||
@@ -1108,17 +1108,17 @@ public class SpelExpressionTransformerUnitTests {
|
||||
void shouldRenderTanh() {
|
||||
assertThat(transform("tanh(angle)")).isEqualTo("{ \"$tanh\" : \"$angle\"}");
|
||||
}
|
||||
|
||||
|
||||
@Test // DATAMONGO - 3709
|
||||
void shouldRenderATan() {
|
||||
assertThat(transform("atan(number)")).isEqualTo("{ \"$atan\" : \"$number\"}");
|
||||
}
|
||||
|
||||
|
||||
@Test // DATAMONGO - 3709
|
||||
void shouldRenderATan2() {
|
||||
assertThat(transform("atan2(number1,number2)")).isEqualTo("{ \"$atan2\" : [ \"$number1\" , \"$number2\" ] }");
|
||||
}
|
||||
|
||||
|
||||
@Test // DATAMONGO - 3709
|
||||
void shouldRenderATanh() {
|
||||
assertThat(transform("atanh(number)")).isEqualTo("{ \"$atanh\" : \"$number\"}");
|
||||
|
||||
@@ -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`), `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`, `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`
|
||||
|
||||
Reference in New Issue
Block a user