add support for duckdb's lambda syntax
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Start by locating SQLPage's SQL parsing and preparation entry points, then inspect the parser tests for database-specific syntax. Reproduce the failure with the supplied DuckDB list_filter(lambda ...) query and verify any change against the existing parser tests. Done means SQLPage accepts this valid DuckDB lambda syntax without breaking other SQL parsing.
由索引模型根据 Issue 内容生成。
描述
Introduction
When using the list_filter function, SQLPage throws an error, stating it's unable to parse the SQL statement (while valid in the underlying database).
To Reproduce
List of steps to reproduce the behavior. Include the sql file you are using and the eventual relevant parts of your database schema
-- DDL statement to create the table:
CREATE SCHEMA loipro;
CREATE TABLE loipro."data"(
row_num BIGINT
, filepath VARCHAR[]
, filename VARCHAR
, msg_dt DATE
, ChangeTimestamp TIMESTAMP
, Components STRUCT(ComponentNumber VARCHAR, Quantity VARCHAR, UnitOfMeasure VARCHAR, Scrap VARCHAR, BomPosition VARCHAR, IssueingStorageLoc VARCHAR, OperationNumberMat VARCHAR, ItemCategory VARCHAR, Backflush VARCHAR)[]
, ChangeDate VARCHAR
, Operations STRUCT(OperationNumber VARCHAR, MachineCode VARCHAR, SetupGroupCategory VARCHAR, ProcStartDate VARCHAR, ProcStartTime VARCHAR, EndDatOperation VARCHAR, EndTimeOperation VARCHAR, SetupTime VARCHAR, SetupTimeUOM VARCHAR)[]
, PlantID VARCHAR
, Unit VARCHAR
, QuantityPlanned VARCHAR
, ChangeTime VARCHAR
, ArticleNumber VARCHAR
, OrderNumber VARCHAR
, OrderType VARCHAR
, ReceivingStorageLoc VARCHAR
, ProductionVersion VARCHAR
);
Query in SQLPlan causing the issue:
SET orders_wo_material =
select count(1)
from loipro.data
where ArticleNumber IS NULL
or Components.list_filter(lambda x: x.ComponentNumber is NULL).length() = Components.length()
;
Actual behavior
[2026-01-04T11:37:10.849Z ERROR sqlpage::webserver::database::execute_queries] Parsing failed: SQLPage couldn't understand the SQL file. Please check for syntax errors on line 28:
where ArticleNumber IS NULL
or Components.list_filter(lambda x: x.ComponentNumber is NULL).length() = Components.length()
⬆️
;
Caused by:
0: sql parser error: Expected: ), found: x at Line: 28, Column: 42
1: loipro/index.sql contains a syntax error preventing SQLPage from parsing and preparing its SQL statements.
[2026-01-04T11:37:10.849Z ERROR sqlpage::render] SQL error: Parsing failed: SQLPage couldn't understand the SQL file. Please check for syntax errors on line 28:
where ArticleNumber IS NULL
or Components.list_filter(lambda x: x.ComponentNumber is NULL).length() = Components.length()
⬆️
;
Caused by:
0: sql parser error: Expected: ), found: x at Line: 28, Column: 42
1: loipro/index.sql contains a syntax error preventing SQLPage from parsing and preparing its SQL statements.
Screenshots
Expected behavior
Expected a single (numeric) value to be returned and stored in the variable.
Version information
- OS: macOS 26.2
- Database: DuckDB v1.4.3 (Andium) d1dc88f950
- ODBC: unixODBC 2.3.14
- DuckDB ODBC driver version: 1.4.3.0
- SQLPage Version : sqlpage 0.41.0
- 主要语言
- Rust
- 星标
- 2.6k
- 派生
- 175
- 平均合并
- 14 小时 16 分钟
- 30 天内合并 PR
- 43
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
sqlpage/SQLPage 的其他 Issue
-
enhancement
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
enhancement
难度 2/5 1-3 小时 新手友好度 65/100
sqlpage/SQLPage#1218 · 3 条评论 ·
维护者通常 1 天内回复
-
There is no convenient way to reproduce issues可能已有人在做 @81reap 于 26 天前认领。 未关闭enhancement
sqlpage/SQLPage#1566 · 已指派 1 人 ·
维护者通常 1 天内回复
-
Confusing sort interface可能已有人在做 @lovasoa 于 73 天前认领。 未关闭bug
难度 4/5 3-5 天 新手友好度 20/100
sqlpage/SQLPage#1442 · 3 条评论 ·
维护者通常 1 天内回复
-
Mutation Testing Results :: Dead Code + Missing Tests可能重新可做 @81reap 于 61 天前认领,目前没有进行中的 PR。 未关闭
sqlpage/SQLPage#1396 · 5 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 70/100
symposium-dev/symposium#530 ·
维护者通常 5 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
topgrade-rs/topgrade#2540 ·
维护者通常 1 天内回复
-
Invalid JSON options for ngram and edge_ngram silently use defaults可能已有人在做 @Tilendlesa 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 65/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 76/100
noemaforge/vimanam#153 ·
维护者通常 1 天内回复