4paradigm / 4paradigm/OpenMLDB

can't lift child `i` to list for udf functions which requires params as list

Offen
#3,039 0 Kommentare 0 Reaktionen 1 zugewiesene Person Beansprucht von @aceforeverd Auf GitHub ansehen
bug execute-engine
Vorherrschende Sprache
C++
Sterne
1.7k
Forks
331
Ø Merge
12 T. 12 Std.
Gemergte PRs (30 T.)
1

Beschreibung

some udf function requires list param, e.g `lag`, `first_value`, `join`, while some exprs can't infer to list, e.g `case when` expr.

A yaml case:

```yaml
- id: 22
inputs:
- name: t1
columns: ["id string", "gp int", "ts int64", "val int"]
indexs: ["index1:gp:ts"]
rows:
- ["0", 1, 5, 66]
- ["1", 1, 6, 67]
sql: |
select id,
lag(case when ts < 10 then ts else null end, 1) over w as agg
from t1
WINDOW w AS (PARTITION BY gp ORDER BY ts ROWS_RANGE BETWEEN 60d PRECEDING AND CURRENT ROW MAXSIZE 101)
expect:
success: true
```

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

The issue involves UDF functions like `lag` that require list parameters, but certain expressions like `case when` cannot be inferred to a list. Examine the SQL engine's type inference logic, particularly around window functions and expression evaluation. Look at the test case in YAML to understand the failing scenario. Check the code handling UDF parameter lifting and expression type resolution.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
sql
Bereich
databases, machine-learning
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.