Repository: dbt-labs/dbt-core

Issue:
[CT-1911] [Bug] Non-standard abbreviations for kibibyte, etc
### Is this a new bug in dbt-core?

- [X] I believe this is a new bug in dbt-core
- [X] I have searched the existing issues, and I could not find an existing issue for this bug

### Context

This is a copy of https://github.com/dbt-labs/dbt-bigquery/issues/477 since there is an (unused!) copy of the relevant code in dbt-core as well.

### Current Behavior

Described in https://github.com/dbt-labs/dbt-bigquery/issues/477

### Expected Behavior

Described in https://github.com/dbt-labs/dbt-bigquery/issues/477

### Steps To Reproduce

Described in https://github.com/dbt-labs/dbt-bigquery/issues/477

### Relevant log output

_No response_

### Environment

```markdown
- OS:
- Python:
- dbt:
```


### Which database adapter are you using with dbt?

_No response_

### Additional Context

_No response_


Discussion:

Resolving patch:
diff --git a/core/dbt/utils.py b/core/dbt/utils.py
--- a/core/dbt/utils.py
+++ b/core/dbt/utils.py
@@ -453,26 +453,6 @@ def __get__(self, obj, objtype):
         return self.func(objtype)
 
 
-def format_bytes(num_bytes):
-    for unit in ["Bytes", "KB", "MB", "GB", "TB", "PB"]:
-        if abs(num_bytes) < 1024.0:
-            return f"{num_bytes:3.1f} {unit}"
-        num_bytes /= 1024.0
-
-    num_bytes *= 1024.0
-    return f"{num_bytes:3.1f} {unit}"
-
-
-def format_rows_number(rows_number):
-    for unit in ["", "k", "m", "b", "t"]:
-        if abs(rows_number) < 1000.0:
-            return f"{rows_number:3.1f}{unit}".strip()
-        rows_number /= 1000.0
-
-    rows_number *= 1000.0
-    return f"{rows_number:3.1f}{unit}".strip()
-
-
 class ConnectingExecutor(concurrent.futures.Executor):
     def submit_connected(self, adapter, conn_name, func, *args, **kwargs):
         def connected(conn_name, func, *args, **kwargs):


Test patch:
diff --git a/test/unit/test_utils.py b/test/unit/test_utils.py
--- a/test/unit/test_utils.py
+++ b/test/unit/test_utils.py
@@ -139,37 +139,6 @@ def test_trivial(self):
             dbt.utils.deep_map_render(lambda x, _: x, {'foo': object()})
 
 
-class TestBytesFormatting(unittest.TestCase):
-
-    def test__simple_cases(self):
-        self.assertEqual(dbt.utils.format_bytes(-1), '-1.0 Bytes')
-        self.assertEqual(dbt.utils.format_bytes(0), '0.0 Bytes')
-        self.assertEqual(dbt.utils.format_bytes(20), '20.0 Bytes')
-        self.assertEqual(dbt.utils.format_bytes(1030), '1.0 KB')
-        self.assertEqual(dbt.utils.format_bytes(1024**2*1.5), '1.5 MB')
-        self.assertEqual(dbt.utils.format_bytes(1024**3*52.6), '52.6 GB')
-        self.assertEqual(dbt.utils.format_bytes(1024**4*128), '128.0 TB')
-        self.assertEqual(dbt.utils.format_bytes(1024**5), '1.0 PB')
-        self.assertEqual(dbt.utils.format_bytes(1024**5*31.4), '31.4 PB')
-        self.assertEqual(dbt.utils.format_bytes(1024**6), '1024.0 PB')
-        self.assertEqual(dbt.utils.format_bytes(1024**6*42), '43008.0 PB')
-
-
-class TestRowsNumberFormatting(unittest.TestCase):
-
-    def test__simple_cases(self):
-        self.assertEqual(dbt.utils.format_rows_number(-1), '-1.0')
-        self.assertEqual(dbt.utils.format_rows_number(0), '0.0')
-        self.assertEqual(dbt.utils.format_rows_number(20), '20.0')
-        self.assertEqual(dbt.utils.format_rows_number(1030), '1.0k')
-        self.assertEqual(dbt.utils.format_rows_number(1000**2*1.5), '1.5m')
-        self.assertEqual(dbt.utils.format_rows_number(1000**3*52.6), '52.6b')
-        self.assertEqual(dbt.utils.format_rows_number(1000**3*128), '128.0b')
-        self.assertEqual(dbt.utils.format_rows_number(1000**4), '1.0t')
-        self.assertEqual(dbt.utils.format_rows_number(1000**4*31.4), '31.4t')
-        self.assertEqual(dbt.utils.format_rows_number(1000**5*31.4), '31400.0t')  # noqa: E501
-
-
 class TestMultiDict(unittest.TestCase):
     def test_one_member(self):
         dct = {'a': 1, 'b': 2, 'c': 3}