SigmaTable
Frequency: Reported
Implement SigmaTable, a simplified version of Sigma's core product, using the supplied Column, DataWarehouseTable, and DataWarehouse classes.
Sigma sits on top of cloud data warehouses. A Sigma table may define virtual columns as functions of other columns—for example, [My Sum Col]: [Data 1] + [Data 2]—and summaries such as the minimum or maximum of a column. Sigma stores the operations needed to produce those results and compiles them to SQL against the latest warehouse data; it does not store or alter the customer's data.
Requirements
- Do not store warehouse data in
SigmaTable; the suppliedget_data_warehousemethod is the only warehouse reference it should retain. - Do not store values computed from warehouse data in
SigmaTable. - Do not add data to the warehouse.
- Trying to use a missing column must raise
ValueError. - Treat missing data as
0. SigmaTablemay retain operation metadata.- Make reasonable choices where the prompt is ambiguous.
The example defines A + B over these columns:
| Col A | Col B | A + B |
|---|---|---|
| 1 | 4 | 5 |
| 2 | 5 | 7 |
| 3 | 6 | 9 |
It also shows summaries Max of Col A = 3 and Min of A + B = 5.
Preserved code
- Starter code, first submitted implementation, and test helpers
- Revised submitted implementation with definition-time column validation
Both submissions are preserved as reported, not presented as verified reference solutions.