apache / apache/datafusion-python

Attach runtime before calling scan for foreign table provider

Abierto
#1,146 0 comentarios 0 reacciones 0 asignados Ver en GitHub
enhancement
Lenguaje dominante
Python
Estrellas
604
Forks
174
Merge medio
2 d 22 h
PR fusionados (30 d)
5

Descripción

**Is your feature request related to a problem or challenge? Please describe what you are trying to do.**

In the table provider for `lance` in the `scan` method I sometimes have to do a small amount of I/O to load dataset metadata if the metadata is not already in the cache. The `scan` method is async so I assume this is ok. However, I use `spawn_blocking` to trigger this I/O and it fails because the runtime is not active.

**Describe the solution you'd like**

The runtime should be attached before calling `scan`.

**Describe alternatives you've considered**

Currently I work around this by forcing the metadata to be cached before creating the table provider but this is inconvenient.

**Additional context**

Can provide additional details (stack traces, lance reproducers, etc.) on request.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

Comienza en el punto de entrada asíncrono `scan` del proveedor de tablas y en la ruta `spawn_blocking` descrita en el issue. Reproduce un fallo de caché de metadatos de Lance, rastrea cuándo se adjunta el runtime en relación con `scan` y confirma que la ruta del fallo de caché se completa sin el error del runtime.

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

Evaluación

Stack tecnológico
python
Área
databases
Tipo de issue
Nueva funcionalidad
Dificultad
4/5
Tiempo estimado
3-5 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.