test_class.file: dataprep-transformation/src/test/java/org/talend/dataprep/transformation/aggregation/operation/MaxTest.java
test_class.identifier: MaxTest
test_class.superclass: extends OperationBaseTest
test_case.body: @Test
      public void shouldComputeMin() {
          // given when
          AggregationResult result = new AggregationResult(Operator.MAX);
          aggregator.accept(getRow("toto", "5123.4"), result);
          aggregator.accept(getRow("tata", "-50.2"), result);
          aggregator.accept(getRow("toto", "786.884"), result);
          aggregator.accept(getRow("tata", "-0.2"), result);
          aggregator.accept(getRow("toto", "41843.453"), result); // <-- max here for toto
          aggregator.accept(getRow("toto", "0"), result);
          aggregator.accept(getRow("tata", "20"), result);
          aggregator.accept(getRow("toto", "-1"), result);
          aggregator.accept(getRow("toto", "8.87"), result);
          aggregator.accept(getRow("tata", "875"), result); // <-- max here for tata
          aggregator.accept(getRow("toto", "-0.01"), result);
          aggregator.accept(getRow("tutu", "sdfs"), result); // <-- should not be part of the result
  
          // then
          Assert.assertEquals(result.get("toto").getValue(), 41843.453, 0);
          Assert.assertEquals(result.get("tata").getValue(), 875, 0);
          Assert.assertNull(result.get("sdfs"));
      }
test_case.class_method_signature: MaxTest.shouldComputeMin()
test_case.full_signature: @Test public void shouldComputeMin()
test_case.identifier: shouldComputeMin
test_case.invocations: accept getRow accept getRow accept getRow accept getRow accept getRow accept getRow accept getRow accept getRow accept getRow accept getRow accept getRow accept getRow assertEquals getValue get assertEquals getValue get assertNull get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldComputeMin()
focal_class.file: dataprep-transformation/src/main/java/org/talend/dataprep/transformation/aggregation/operation/Max.java
focal_class.identifier: Max
focal_class.interfaces: implements Aggregator
focal_class.class_method_signature: Max.Max(String groupBy, String columnId)
focal_class.full_signature:   Max(String groupBy, String columnId)
focal_class.identifier: Max
focal_class.parameters: (String groupBy, String columnId)
focal_class.signature:  Max(String groupBy, String columnId)
focal_class.class_method_signature: Max.accept(DataSetRow row, AggregationResult result)
focal_class.full_signature: @Override public void accept(DataSetRow row, AggregationResult result)
focal_class.identifier: accept
focal_class.modifiers: @Override public
focal_class.parameters: (DataSetRow row, AggregationResult result)
focal_class.return: void
focal_class.signature: void accept(DataSetRow row, AggregationResult result)
focal_class.class_method_signature: Max.normalize(AggregationResult result)
focal_class.full_signature: @Override public void normalize(AggregationResult result)
focal_class.identifier: normalize
focal_class.modifiers: @Override public
focal_class.parameters: (AggregationResult result)
focal_class.return: void
focal_class.signature: void normalize(AggregationResult result)
focal_class.superclass: extends AbstractAggregator
focal_method.body: @Override
      public void accept(DataSetRow row, AggregationResult result) {
          final String maxKey = row.get(groupBy);
  
          // skip value not found
          if (StringUtils.isEmpty(maxKey)) {
              return;
          }
  
          // get the value
          double value;
          try {
              value = Double.parseDouble(row.get(columnId));
          } catch (NumberFormatException e) {
              // skip non number
              return;
          }
  
          // init the group by in the result
          if (!result.contains(maxKey)) {
              result.put(maxKey, new NumberContext(value));
          }
  
          NumberContext context = (NumberContext) result.get(maxKey);
  
          if (value > context.getValue()) {
              context.setValue(value);
          }
      }
focal_method.class_method_signature: Max.accept(DataSetRow row, AggregationResult result)
focal_method.full_signature: @Override public void accept(DataSetRow row, AggregationResult result)
focal_method.identifier: accept
focal_method.invocations: get isEmpty parseDouble get contains put get getValue setValue
focal_method.modifiers: @Override public
focal_method.parameters: (DataSetRow row, AggregationResult result)
focal_method.return: void
focal_method.signature: void accept(DataSetRow row, AggregationResult result)