fix(data-process): 修复三数据集发布参数错误

This commit is contained in:
caoxiaozhu
2026-07-25 18:19:37 +08:00
parent 749c84a62b
commit 07e2999323
2 changed files with 13 additions and 3 deletions

View File

@@ -1399,8 +1399,11 @@ class DataProcessStore:
size, size_bytes, count, record_count, description, metadata,
tenant_id, project_id, owner_id, created_by, create_time,
created_at, updated_at)
VALUES (%s, %s, %s, %s, 'task', %s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)
VALUES (
%s, %s, %s, %s, 'task', %s, %s,
%s, %s, %s, %s, %s, %s,
%s, %s, %s, %s, %s, %s, %s
)
RETURNING *
""",
(

View File

@@ -1,8 +1,9 @@
from __future__ import annotations
from collections.abc import Iterator
from contextlib import contextmanager
from decimal import Decimal
from typing import Any, Iterator
from typing import Any
import pytest
@@ -35,6 +36,12 @@ class _PublishConnection:
def execute(self, sql: str, params: Any = None) -> _Result:
normalized = " ".join(sql.split())
if params is not None:
placeholder_count = normalized.count("%s")
assert placeholder_count == len(params), (
f"SQL placeholder count {placeholder_count} does not match "
f"parameter count {len(params)}"
)
if normalized.startswith("SELECT * FROM data_process_results"):
return _Result(rows=self.results)
if normalized.startswith("SELECT * FROM datasets WHERE source_task_id"):