cswork / OA打开练习工作台

Sigma ComputingOA #1

Implement SigmaTable (Lazy Spreadsheet over a Data Warehouse)

估计中等评测数据准备中,可先阅读题面

考点(AI 标注)迭代器设计字符串

In this assessment, you will implement a simplified version of our core product. We provide a few starter classes (Column, DataWarehouseTable, DataWarehouse), and your task is to implement SigmaTable.

Background

Sigma is a user interface that sits on top of various cloud data warehouses. We provide a unified way to interact with your data, despite differences in warehouse implementations. Data warehouses contain tables, usually similar to SQL tables.

A SigmaTable has rows and columns, in which you can create columns that are functions of other columns (e.g. [My Sum Col] : [Data 1] + [Data 2]). We also have the ability to add summaries to our tables, which are aggregations (like Min or Max) of all values in a column.

Implementation details (must follow)

  • For security reasons, do not store any warehouse data other than the get_data_warehouse method in the SigmaTable class. Do not store data computed from warehouse data in the SigmaTable either.
  • Do not store additional data in the data warehouse.
  • Trying to use a missing column should raise a ValueError.
  • Missing data should be treated as 0.
  • You can store whatever metadata you want in the SigmaTable.
  • In cases of ambiguity, make reasonable choices.

Example

A SigmaTable named My Cool Data with Col A = [1,2,3], Col B = [4,5,6], computed A + B = [5, 7, 9]. Summary widgets show Max of Col A = 3, Min of A + B = 5. Formulas reference columns by [Col A] or by [My Cool Warehouse/Col A] (full path).