aminghadersohi opened a new pull request, #44720: URL: https://github.com/apache/superset/pull/44720
### SUMMARY CrateDB returns timestamps as epoch-millisecond integers. Its SQLAlchemy dialect reflects timestamp columns as `TIMESTAMP WITHOUT TIME ZONE` or `TIMESTAMP WITH TIME ZONE`, but `alter_new_orm_column` only recognized `TIMESTAMP`. The dataset therefore lacked `python_date_format = epoch_ms`, and chart normalization interpreted the integers as nanoseconds. Recognize all three timestamp spellings when initializing a dataset column. Other types and their configured formats are unchanged. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF No visual changes. Daily chart buckets for January 2024 were normalized into January 1970; the same epoch-millisecond values now normalize to January 2024. ### TESTING INSTRUCTIONS - `pytest tests/unit_tests/db_engine_specs/test_crate.py -q`: before **2 failed / 10 passed**, after **12 passed**. - The parameterized regression covers all three timestamp spellings, actual datetime normalization (including nulls), and non-timestamp columns. - Create a CrateDB table with a timestamp column, create a dataset from it, and request a daily time-series chart. Verify the bucket dates match the source dates. - Pre-commit on both changed files passed, including mypy, Ruff, and pylint. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [ ] Changes UI - [ ] Includes DB Migration - [ ] Introduces new feature or API - [ ] Removes existing feature or API Applies when dataset columns are initialized; existing datasets whose timestamp format is unset need their timestamp format corrected to `epoch_ms`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
