add support for duckdb's lambda syntax
Mantenedores costumam responder em até 1 dia
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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
- Linguagem predominante
- Rust
- Estrelas
- 2.6k
- Forks
- 175
- Merge médio
- 14h 16min
- PRs com merge (30d)
- 43
Preparar o ambiente
- Inclui um Dockerfile ou arquivo Docker Compose
- Sem modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de sqlpage/SQLPage
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100
Mantenedores costumam responder em até 1 dia
-
enhancement
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
sqlpage/SQLPage#1218 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
-
There is no convenient way to reproduce issuesTalvez já em andamento @81reap assumiu há 26 dias. Abertaenhancement
sqlpage/SQLPage#1566 · 1 responsável ·
Mantenedores costumam responder em até 1 dia
-
Confusing sort interfaceTalvez já em andamento @lovasoa assumiu há 74 dias. Abertabug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 20/100
sqlpage/SQLPage#1442 · 3 comentários ·
Mantenedores costumam responder em até 1 dia
-
Mutation Testing Results :: Dead Code + Missing TestsTalvez livre de novo @81reap assumiu há 61 dias e não há nenhum pull request aberto. Aberta
sqlpage/SQLPage#1396 · 5 comentários · 1 responsável ·
Mantenedores costumam responder em até 1 dia
Todas as issues de sqlpage/SQLPage
Issues semelhantes
-
CI/CD ignore-for-release
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
eclipse-ankaios/ankaios#844 ·
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
Mantenedores costumam responder em até 1 dia
-
std: `SliceIndex<str>` missing for `std::ops` ranges, so generic `R: SliceIndex<str>` bounds failAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 70/100
symposium-dev/symposium#530 ·
Mantenedores costumam responder em até 5 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 76/100
Mantenedores costumam responder em até 1 dia