bito-code-review[bot] commented on PR #35848:
URL: https://github.com/apache/superset/pull/35848#issuecomment-3448461197
<details open>
<summary><strong>Interaction Diagram by <a
href="https://bito.ai#sequence_diagram">Bito</a></strong></summary>
```mermaid
sequenceDiagram
participant Test as Test Framework
participant Db2 as Db2EngineSpec<br/>🔄 Updated | ●●● High
participant TimeGrains as _time_grain_expressions<br/>🔄 Updated | ●●● High
participant Base as BaseEngineSpec
participant Query as Query Generator
participant DB as Database
Note over Db2, TimeGrains: DAY grain simplified from CAST to DATE()
Test->>Db2: test_time_grain_expressions()
Db2->>TimeGrains: Access _time_grain_expressions[TimeGrain.DAY]
TimeGrains-->>Db2: Return 'DATE({col})'
Test->>TimeGrains: Format expression with col parameter
Test->>Db2: test_time_grain_day_parseable()
Db2->>TimeGrains: Get DAY expression
Base->>TimeGrains: get_time_grain_expressions() copies dict
Query->>Base: construct_timestamp_expression()
Base->>Query: Use simplified DATE expression
Query->>DB: Execute query with DATE function
```
Critical path: Test
Framework->Db2EngineSpec->_time_grain_expressions->BaseEngineSpec->Query
Generator->Database
> **Note:** The DAY time grain expression in Db2EngineSpec was simplified
from a complex CAST with multiple time subtractions to a simple DATE()
function. This change improves SQL parseability and is validated by new
parametrized tests that verify all time grain expressions and ensure the DAY
expression can be parsed by sqlglot.
</details>
--
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]