code: @Override
      public void serializePrimitive(IntSumRecord rec, String fieldName, Object value) {
          /// only interested in int values.
          if(value instanceof Integer) {
              rec.addValue(((Integer) value).intValue());
          }
      }
docs: We need to implement serializePrimitive to describe what happens when we encounter one of the following types:
  Integer, Long, Float, Double, Boolean, String.