InfuseAI / piperider

Code review for data in dbt
https://www.piperider.io/
Apache License 2.0
480 stars 23 forks source link

[Bug] Fix the overflow issue if the datetime column has very large date #858

Closed popcornylu closed 1 year ago

popcornylu commented 1 year ago

If there is a very large date, it will hit the overflow exception

Error: Profiler Exception: OverflowError('date value out of range')

Example sql

SELECT '9999-12-31 00:00:00 +0000'::timestamp_tz as d

PR checklist

codecov[bot] commented 1 year ago

Codecov Report

Merging #858 (d7eb387) into main (388621d) will increase coverage by 2.77%. Report is 6 commits behind head on main. The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #858      +/-   ##
==========================================
+ Coverage   45.10%   47.87%   +2.77%     
==========================================
  Files          70       71       +1     
  Lines        9851     9948      +97     
==========================================
+ Hits         4443     4763     +320     
+ Misses       5408     5185     -223     
Files Changed Coverage Δ
piperider_cli/profiler/profiler.py 74.49% <100.00%> (+2.35%) :arrow_up:

... and 12 files with indirect coverage changes

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more