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

Commit e524fd8

Browse files
committed
elaborate normalize_timestamp expectations
1 parent 24016cc commit e524fd8

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

data_diff/databases/base.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,12 @@ def normalize_timestamp(self, value: str, coltype: TemporalType) -> str:
800800
Date format: ``YYYY-MM-DD HH:mm:SS.FFFFFF``
801801
802802
Precision of dates should be rounded up/down according to coltype.rounds
803+
e.g. precision 3 and coltype.rounds:
804+
- 1969-12-31 23:59:59.999999 -> 1970-01-01 00:00:00.000000
805+
- 1970-01-01 00:00:00.000888 -> 1970-01-01 00:00:00.001000
806+
- 1970-01-01 00:00:00.123123 -> 1970-01-01 00:00:00.123000
807+
808+
Make sure NULLs remain NULLs
803809
"""
804810

805811
@abstractmethod

0 commit comments

Comments
 (0)