Requirements for scalar UDF preimage
- Lenguaje dominante
- Rust
- Estrellas
- 9.3k
- Forks
- 2.4k
- Merge medio
- 3 d 11 h
- PR fusionados (30 d)
- 360
Descripción
`ScalarUDFImpl::preimage` allows defining "preimage" (range of input values) for function outputs, which can be used to rewrite binary comparison expressions.
The rewrite rules for equality (`=`) or inequality (`!=`) seem intuitive. But `f(x) <= c` would also be rewritten to `x < u` where `u` is the (exclusive) upper bound. (Here is the [code](https://github.com/apache/datafusion/pull/19722/changes#diff-3f015bb6ca85b8af8daaef1f0959e0b49ec6bcbcf675b9ea2d87d52a95893773).) I'm not sure if this holds in general. Does this assume that the function must be monotonically non-decreasing?
I was trying to see if the documentation mentions monotonicity for scalar UDFs but I couldn't find it. Let me know if I misunderstood anything!
Guía de contribución
Línea de trabajo
Comienza con el punto de entrada ScalarUDFImpl::preimage y las reglas de reescritura para igualdad y desigualdad referenciadas en pull request 19722. Comprueba si la documentación existente sobre UDF escalares aborda la monotonía o los requisitos de preimage. Se considera terminado cuando se documenten las suposiciones necesarias y se aclare si la reescritura <= es válida en general.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- rust
- Área
- backend
- Tipo de issue
- Documentación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Tranquilo
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 48/100