add support for duckdb's lambda syntax
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 48/100
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Rust
- Stelle
- 2.6k
- Fork
- 175
- Merge medio
- 14h 16m
- PR unite (30g)
- 43
Preparare l'ambiente
- Include un Dockerfile o un file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di sqlpage/SQLPage
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
sqlpage/SQLPage#1218 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
There is no convenient way to reproduce issuesForse già presa @81reap l’ha presa 26 giorni fa. Apertaenhancement
sqlpage/SQLPage#1566 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Confusing sort interfaceForse già presa @lovasoa l’ha presa 73 giorni fa. Apertabug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 20/100
sqlpage/SQLPage#1442 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Mutation Testing Results :: Dead Code + Missing TestsForse di nuovo libera @81reap l’ha presa 61 giorni fa e non c’è nessuna pull request aperta. Aperta
sqlpage/SQLPage#1396 · 5 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di sqlpage/SQLPage
Issue simili
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
symposium-dev/symposium#530 ·
I maintainer di solito rispondono entro 5 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
topgrade-rs/topgrade#2540 ·
I maintainer di solito rispondono entro 1 giorno
-
Invalid JSON options for ngram and edge_ngram silently use defaultsForse già presa @Tilendlesa l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
noemaforge/vimanam#153 ·
I maintainer di solito rispondono entro 1 giorno