fix(scripts): calibrate_ask.py SQL ::timestamptz cast 파싱 충돌 해소
SQLAlchemy text() 의 `:name` 파라미터가 PostgreSQL `::type` cast 와 토큰 경계 충돌로 치환되지 않아 `syntax error at or near ":"` 발생. `:since::timestamptz` → `CAST(:since AS TIMESTAMPTZ)` 로 변경. Reproduction: --since/--until 옵션 사용 시 모든 집계 쿼리 실패. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -109,8 +109,8 @@ def build_filters(args: argparse.Namespace) -> tuple[str, dict[str, Any]]:
|
||||
clauses = [
|
||||
"(:source IS NULL OR source = :source)",
|
||||
"(:prompt_version IS NULL OR prompt_version = :prompt_version)",
|
||||
"(:since IS NULL OR created_at >= :since::timestamptz)",
|
||||
"(:until IS NULL OR created_at < :until::timestamptz)",
|
||||
"(:since IS NULL OR created_at >= CAST(:since AS TIMESTAMPTZ))",
|
||||
"(:until IS NULL OR created_at < CAST(:until AS TIMESTAMPTZ))",
|
||||
]
|
||||
params: dict[str, Any] = {
|
||||
"source": args.source,
|
||||
|
||||
Reference in New Issue
Block a user