fix: 终审修复——test_case_id 格式校验、modify 空变更报错、异常兜底与文档补充
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -33,6 +33,7 @@
|
||||
- `TableDump = {"name": str, "columns": [{"name": str, "type": str}], "rows": [[原始值]], "total_rows": int, "truncated": bool}`
|
||||
- `ExpectedQuery = {"columns": [str], "rows": [[原始值]], "total_rows": int, "truncated": bool}`(query 模式)
|
||||
- `ExpectedModify = {"changed_tables": [TableDump, ...]}`(modify 模式,只含执行标准答案后内容有变化的表)
|
||||
- 被标准答案 DROP 的表以 `{"dropped": true, "rows": [], "total_rows": 0}` 条目出现(columns 取初始结构);标准答案未改任何表时抛 SQLCaseError
|
||||
|
||||
- [ ] **Step 1: 在 `sql_runner.py` 末尾追加展示数据生成代码**
|
||||
|
||||
|
||||
@@ -44,6 +44,8 @@ SQL 题目前沿用传统题的展示结构:「输入/输出」两段富文本
|
||||
|
||||
- query 模式:`expected` 为 `{columns, rows}` 结果集
|
||||
- modify 模式:`expected` 为 `{"changed_tables": [{name, columns, rows, total_rows, truncated}]}`,只含有变化的表
|
||||
- modify 模式中被标准答案 DROP 的表以 `{"name", "columns"(原结构), "rows": [], "total_rows": 0, "truncated": false, "dropped": true}` 条目出现,前端渲染为「XX 表已被删除」
|
||||
- modify 模式若标准答案未改动任何表,保存时报错(视为出题配置问题)
|
||||
|
||||
### 生成逻辑
|
||||
|
||||
|
||||
Reference in New Issue
Block a user