apache / apache/datafusion-sqlparser-rs

Increase testing & SQL support

Abierto
#212 2 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Rust
Estrellas
3.5k
Forks
772
Merge medio
4 d 9 h
PR fusionados (30 d)
17

Descripción

I want to write down some ideas about increasing support for commonly used SQL statement.

Some different ideas for doing more testing:

1. Add SQL corpora that should be parsed correctly. I think we can create a directory with multiple dialects with multiple corpora.
Examples can be TPCDS benchmark http://www.tpc.org/tpcds/ and other resources from different projects.
We can test two main things here:
- Whether everything parses to a statement
- When serialized (e.g. to JSON), whether it outputs the same thing as a earlier version of slqparser.
2. Increasing test coverage by adding unit tests
3. Increasing test coverage (not only when measuring coverage by line) by adding property-based tests https://github.com/BurntSushi/quickcheck https://github.com/AltSysrq/proptest
3. Add debug asserts, to make sure any assumptions about the inputs are correct. Because those are enabled during testing, they can be very helpful in general to make sure those really hold.
4. Fuzzing https://github.com/andygrove/sqlparser-rs/pull/211 . This can help with finding any edge cases in the parser which crashes without much effort.

Some great list of general testing strategies can be found here:
https://www.sqlite.org/testing.html

Any feedback, ideas on this?

Guía de contribución

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

Línea de trabajo

Este issue es una propuesta amplia que abarca corpus de SQL, pruebas unitarias y basadas en propiedades, aserciones de depuración y fuzzing, sin especificar ningún archivo o prueba concretos. Empieza revisando los puntos de entrada actuales de las pruebas del parser y el trabajo de fuzzing en PR #211. Para darlo por terminado, es necesario acotar la propuesta a un cambio concreto en las pruebas con un resultado explícito de parsing, serialización o fuzzing.

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

Evaluación

Stack tecnológico
rust, sql
Área
databases, testing-qa
Tipo de issue
Nueva funcionalidad
Dificultad
5/5
Tiempo estimado
Más de una semana
Estado de actividad
Estancado
Claridad
Necesita aclaración
Aptitud para principiantes
25/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.