[BUG] Filtering on built-in columns (createdAt, updatedAt) silently returns zero rows

未关闭
#5,920 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

  • #5972 来自 @tusharmotwani1718 —— 已关闭,未合并
  • #6114 来自 @serhiizghama —— 已关闭,未合并

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
typescript
领域
api, database

调研方向

Start with the v1 tables rows endpoint and its filter handling, then compare built-in-column filtering with the sort builder behavior described in the issue. Reproduce the createdAt range query and verify that filters on createdAt, updatedAt, and id return matching rows rather than an empty result.

由索引模型根据 Issue 内容生成。

描述

bug

Describe the bug

The docs state that createdAt, updatedAt, and id are built-in columns that "you can still filter and sort on". Sorting on these works. Filtering on them does not. Any filter referencing a built-in column silently matches nothing and returns an empty result set.

To Reproduce

Via the v1 API:

GET /api/v1/tables/{tableId}/rows?workspaceId={wsId}&filter={"createdAt":{"$gte":"2026-07-24T03:00:00.000Z","$lte":"2026-07-25T02:59:59.999Z"}}

With a string value, returns 400 Bad Request:

{
  "error": "Range operator on column \"createdAt\" (number) requires a number, got string"
}

With a numeric value (Unix timestamp)

{ "rows": [], "rowCount": 0, "totalCount": 0 }

Passes validation, but returns empty results. No error, no warning, just zero rows regardless of how many rows match the range.

Expected behavior

Filters on createdAt / updatedAt / id compare against the top-level row columns (user_table_rows.createdAt, etc.) and return matching rows, mirroring the behavior the sort builder already provides.

Additional context

I think I can open a PR to solve this, if this intend to work the way I've described it.

主要语言
TypeScript
星标
29.8k
派生
3.9k
平均合并
1 小时 44 分钟
30 天内合并 PR
841

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

simstudioai/sim 的其他 Issue

查看 simstudioai/sim 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。