Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.

Commit 956d297

Browse files
committed
fix float value precision calculation
1 parent 6c8eee9 commit 956d297

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

data_diff/databases/databricks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import math
12
from typing import Dict, Sequence
23
import logging
34

@@ -112,7 +113,7 @@ def _process_table_schema(
112113
row = (row[0], row_type, None, None, 0)
113114

114115
elif issubclass(type_cls, Float):
115-
numeric_precision = self._convert_db_precision_to_digits(row[2])
116+
numeric_precision = math.ceil(row[2] / math.log(2, 10))
116117
row = (row[0], row_type, None, numeric_precision, None)
117118

118119
elif issubclass(type_cls, Decimal):

0 commit comments

Comments
 (0)