codeant-ai-for-open-source[bot] commented on PR #38174:
URL: https://github.com/apache/superset/pull/38174#issuecomment-3942537563
## **Sequence Diagram**
Shows how the table metadata endpoint detects ODPS partitioned tables,
constructs a Partition object, and routes metadata/preview generation to
OdpsEngineSpec which injects a partition filter into the SELECT used for
preview.
```mermaid
sequenceDiagram
participant Client as SQLLab/UI
participant API as Databases API (table_metadata)
participant DAO as DatabaseDAO.is_odps_partitioned_table
participant Engine as OdpsEngineSpec
participant DB as Database (sqla / pyodps)
Client->>API: GET /table_metadata?name=table...
API->>DAO: is_odps_partitioned_table(database, table_name)
DAO-->>API: (is_partitioned=True, partition_fields=["p1",...])
API->>Engine: get_table_metadata(database, table, Partition(...))
Engine->>DB: get columns/metadata & select_star(...)
Engine->>DB: select_star includes partition WHERE for ODPS partitioned
table
DB-->>Engine: table metadata + selectStar SQL
Engine-->>API: TableMetadataResponse (with partition-aware selectStar)
API-->>Client: 200 OK (table metadata and preview SQL)
```
---
*Generated by [CodeAnt AI](https://codeant.ai)*
--
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]