Repository navigation
[2.0] fix(ingestion): reliably parse epoch and ISO datetime bounds (#36169) - #37427
Merged
Merged
Conversation
Backport 29ee668. Preserve 2.0 timezone helpers and isolate datetime regression tests from newer row-tolerance behavior.
Code Review ✅ Approved🟡 Medium risk · Changing epoch/ISO bound parsing and pandas datetime comparisons could alter data-quality validation verdicts for timestamp columns. Backports datetime data-quality bound parsing to 2.0 so epoch seconds/milliseconds, signed or fractional numerics, and ISO dates with timezone offsets are parsed consistently, with pandas min/max preserving microseconds. No issues found. VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
harshach
approved these changes
Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe your changes:
Backport of #36169 to
2.0(source commit29ee6687cacde7a525052603b3d57d5d5542d3a8).Fix datetime data-quality bounds that fail to parse or are scaled incorrectly because their string length includes a sign, leading zeroes, or fractional seconds. ISO dates and timezone offsets are parsed consistently, and pandas comparisons preserve microseconds.
Type of change:
High-level design:
Carry over numeric-first parsing, the existing absolute-magnitude seconds/milliseconds cutoff, ISO parsing via the existing python-dateutil dependency, and opt-in datetime preservation in shared pandas min/max metrics. Default metric output and dimensional accumulators remain epoch milliseconds.
Conflict resolutions for 2.0:
test_datetime_bounds.py; 2.0 does not contain the unrelated row-tolerance suite that hosted these tests on main.Tests:
Use cases covered
Numeric seconds/milliseconds, fractions, signs, leading zeroes, scientific notation, numeric compact-date precedence, ISO dates/offsets, timezone independence, invalid/non-finite inputs, SQLite/pandas boundary verdicts, microseconds across chunks/nulls, default numeric metrics, and dimensional compatibility.
Unit tests
Python 3.10.18 with models generated from the 2.0 schemas and
PYTHONPATH=src:python -m pytest -p no:rerunfailures tests/unit/metadata/utils/test_time_utils.py tests/unit/test_time_utils.py tests/unit/observability/data_quality/validations/test_datetime_bounds.py tests/unit/observability/profiler/pandas/test_datalake_metrics.py -q --tb=short— 134 passed.python -m pytest -p no:rerunfailures tests/unit/metadata/utils/test_time_utils.py tests/unit/test_time_utils.py tests/unit/observability/data_quality tests/unit/observability/profiler/pandas/test_datalake_metrics.py tests/unit/test_dbt.py tests/unit/topology/database/test_life_cycle_query_mixin.py -q --tb=short --cov=metadata.utils.time_utils --cov=metadata.profiler.metrics.static.min --cov=metadata.profiler.metrics.static.max --cov=metadata.data_quality.validations.column.pandas.columnValuesToBeBetween --cov-report=json:/private/tmp/backport-36169-coverage.json --cov-report=term— 590 passed, no failures before interruption. Stopped the optional expansion during DBT HTTP retry waits (urllib3/util/retry.py); the data-quality subtree and profiler suite had completed. Remaining DBT/lifecycle tests are pending. No coverage percentage is claimed because interruption prevented the report.make py_formatandmake py_format_check— passed (2,754 files); commit and push hooks passed.make static-checks— blocked by seven missing optional-import errors (pyspark/delta/deltalake/elasticsearch8). The exact same seven errors occur against unchanged 2.0 source in the same environment; no new type errors.Backend integration tests
Not applicable — no Java or API changes.
Ingestion integration tests
The focused tests execute real in-memory SQLite and pandas validation. External-service integration suites were not run; their shared time-utils imports concern unchanged day-boundary helpers.
Playwright (UI) tests
Not applicable — no UI changes.
Manual testing performed
No manual server/UI test. Independent compatibility review of
20bc524c7279170d8795605f9f49ab7399ea300bagainst REVIEW.md found no blocking findings. Verified required metric configuration helpers and dependencies exist in 2.0;git diff --checkpassed.UI screen recording / screenshots:
Not applicable — no UI changes.
Checklist: