Github user mkesselaers commented on the issue:

    https://github.com/apache/spark/pull/18229
  
    @srowen , my apologies, I must have misunderstood you.
    I changed the calculation to be MebiBytes, but afterwards saw in the tests 
that the calculation was already correct
    `  test("bytesToString") {
        assert(Utils.bytesToString(10) === "10.0 B")
        assert(Utils.bytesToString(1500) === "1500.0 B")
        assert(Utils.bytesToString(2000000) === "1953.1 KB")
        assert(Utils.bytesToString(2097152) === "2.0 MB")
        assert(Utils.bytesToString(2306867) === "2.2 MB")
        assert(Utils.bytesToString(5368709120L) === "5.0 GB")
        assert(Utils.bytesToString(5L * (1L << 40)) === "5.0 TB")
        assert(Utils.bytesToString(5L * (1L << 50)) === "5.0 PB")
        assert(Utils.bytesToString(5L * (1L << 60)) === "5.0 EB")
        assert(Utils.bytesToString(BigInt(1L << 11) * (1L << 60)) === "2.36E+21 
B")
      }`
    
    Can you please help me with the one?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to