FrancescoCastaldi opened a new pull request, #43698:
URL: https://github.com/apache/superset/pull/43698
### Summary
This PR addresses **Issue #43231** by modernizing the IBM Db2 time grain
expressions using the native `DATE_TRUNC` scalar function, and expands database
engine spec test suites across 17 database dialects.
### Changes
1. **IBM Db2 Engine Spec (`superset/db_engine_specs/db2.py`)**:
- Replaced arithmetic timestamp manipulation with native
`DATE_TRUNC('SECOND'|'MINUTE'|'HOUR'|'DAY'|'WEEK'|'MONTH'|'QUARTER'|'YEAR',
{col})` for clean execution and ISO-8601 week alignment.
- Updated unit tests in `tests/unit_tests/db_engine_specs/test_db2.py`.
2. **Database Engine Specs Unit Test Hardening**:
- Added and strengthened properties and metadata unit test suites across
16 database dialects:
- Apache Drill (`test_drill.py`)
- Apache Druid (`test_druid.py`)
- Apache Hive (`test_hive.py`)
- Apache Impala (`test_impala.py`)
- Apache Kylin (`test_kylin.py`)
- MariaDB (`test_mariadb.py`)
- Apache Pinot (`test_pinot.py`)
- Amazon Redshift (`test_redshift.py`)
- SingleStore (`test_singlestore.py`)
- StarRocks (`test_starrocks.py`)
- TDengine (`test_tdengine.py`)
- TimescaleDB (`test_timescaledb.py`)
- YDB (`test_ydb.py`)
- SAP HANA (`test_hana.py`)
- Firebird (`test_firebird.py`)
- Azure Data Explorer / Kusto (`test_kusto.py`)
### Testing Instructions
- Run `pytest tests/unit_tests/db_engine_specs/test_db2.py`
- Run `pytest tests/unit_tests/db_engine_specs/`
--
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]