duckdb / duckdb/duckdb-python

values() creates one row of arrays instead of multiple rows

Abierto
#407 0 comentarios 0 reacciones 0 asignados Ver en GitHub
needs triage
Lenguaje dominante
Python
Estrellas
187
Forks
112
Merge medio
13 h 29 min
PR fusionados (30 d)
17

Descripción

### What happens?

I believe this behavior is a bug and not actually intended, but I may be wrong.

`duckdb.values([(10, 'A'), (20, 'B')])` produces a table with one row of VARCHAR[] values, instead of a table with two rows and two columns with different types.

Other alternatives like:

- `duckdb.values((10, 'A'), (20, 'B'))`
- `duckdb.values("(10, 'A'), (20, 'B')")`

just fail.

### To Reproduce

```
duckdb.values([(10, 'A'), (20, 'B')]).df()
```

### OS:

macOS Tahoe

### DuckDB Package Version:

1.5.1

### Python Version:

3.12.13

### Full Name:

Carlos

### Affiliation:

Mutt

### What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.

I have not tested with any build

### Did you include all relevant data sets for reproducing the issue?

No - Other reason (please specify in the issue body)

### Did you include all code required to reproduce the issue?

- [x] Yes, I have

### Did you include all relevant configuration to reproduce the issue?

- [x] Yes, I have

Guía de contribución

Abrir la guía de contribución

Línea de trabajo

Start by reproducing the issue with duckdb.values([(10, 'A'), (20, 'B')]).df() using the reported Python and package versions. Trace the Python values() entry point and compare its handling of a list of tuples with the documented alternatives; done means the input yields two rows and two columns with the expected differing types, with regression coverage for the reported call.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
python
Área
database
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
55/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.