4paradigm / 4paradigm/OpenMLDB

request mode: last join order by check should fail if column is not ts of a index

Abierto
#2,493 1 comentario 0 reacciones 1 asignado Reclamado por @aceforeverd Ver en GitHub
bug execute-engine high-priority
Lenguaje dominante
C++
Estrellas
1.7k
Forks
331
Merge medio
12 d 12 h
PR fusionados (30 d)
1

Descripción

**Bug Description**

here is the yaml case
```yaml
- id: 1
sql: |
SELECT t1.col1 as id, t1.col0 as t1_col0, t1.col1 + t2.col1 + 1 as test_col1, t1.col2 as t1_col2, str1 FROM t1
last join t2 order by t2.col5 on t1.col1=t2.col1 and t1.col5 = t2.col5;

inputs:
- name: t1
schema: col0:string, col1:int32, col2:int16, col3:float, col4:double, col5:int32, col6:string
index: index2:col2
data: |
0, 1, 5, 1.1, 11.1, 1, 1
0, 2, 5, 2.2, 22.2, 2, 22
1, 3, 55, 3.3, 33.3, 1, 333
1, 4, 55, 4.4, 44.4, 2, 4444
2, 5, 55, 5.5, 55.5, 3, aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
- name: t2
schema: str0:string, str1:string, col3:float, col4:double, col2:int16, col1:int32, col5:int64
index: index1:col1:col5
data: |
2, EEEEE, 5.5, 55.5, 550, 5, 3
1, DDDD, 4.4, 44.4, 550, 4, 2
1, CCC, 3.3, 33.3, 550, 3, 1
0, BB, 2.2, 22.2, 50, 2, 2
0, A, 1.1, 11.1, 50, 1, 1
expect:
schema: id:int32, t1_col0:string, test_col1:int32, t1_col2:int16, str1:string
order: id
data: |
1, 0, 3, 5, A
2, 0, 5, 5, BB
3, 1, 7, 55, CCC
4, 1, 9, 55, DDDD
5, 2, 11, 55, EEEEE
```
`t1.col5` is int32 and not ts of a index, but it compiles ok in request mode

**Expected Behavior**

**Steps to Reproduce**

1.
2.
3.
4.

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

The issue is about a SQL join validation bug in request mode. Look at the SQL compiler code handling 'last join order by' clauses, specifically the type checking for the order by column against index timestamps. The test case in the issue body provides a failing YAML example; start by locating where request mode compilation occurs and add a check that t1.col5 must be a timestamp of an index. Run the existing test suite to see the current behavior.

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
3/5
Tiempo estimado
1-2 días
Estado de actividad
Estancado
Claridad
Bastante claro
Aptitud para principiantes
45/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.