4paradigm / 4paradigm/OpenMLDB
can't lift child `i` to list for udf functions which requires params as list
- Lenguaje dominante
- C++
- Estrellas
- 1.7k
- Forks
- 331
- Merge medio
- 12 d 12 h
- PR fusionados (30 d)
- 1
Descripción
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
```
Guía de contribución
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- sql
- Área
- databases, machine-learning
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100