apache / apache/datafusion

Improve regeneration of sqlite expected test suite

Aperta
#14,906 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Rust
Stelle
9.3k
Fork
2.4k
Merge medio
3g 11h
PR unite (30g)
360

Descrizione

### Is your feature request related to a problem or challenge?

Thanks to some great work from @Omega359 as part of each commit to main DataFusion runs many thousand queries from the sqlite test suite ❤

This is documented here:

https://github.com/apache/datafusion/blob/d47f7fb00f8ce175885ce6a59b8361f4ef8a93e1/datafusion/sqllogictest/README.md?plain=1#L218-L252

When expected output changes (for example, error messages) we currently use a script https://github.com/apache/datafusion/blob/main/datafusion/sqllogictest/regenerate_sqlite_files.sh that:
1. It relies on a fork of sqlogictest
2. It relies on a modified driver program

This is problematic because
1. As the code in datafusion is updated (for example to new sqlogictest versions) the modified driver program may not work with the new sqlogictest version
2. The modified driver program may not work with new versions of sqllogictest

This happened with https://github.com/apache/datafusion/pull/14824 which made it hard to update the expected output

### Describe the solution you'd like

I would like to make sure that `regenerate_sqlite_files.sh` will always work and will not bitrot over time

@Omega359 says:

> That is exactly what I was thinking and hopefully will fix tonight. I think a decent short-term fix is to 'lock' the sqllogictest-rs dependency version and add a comment that any update to it will require a full run of the regenerate script before committing.
>
> Long term ideally would be to improve my changes to my fork of sqllogictest-rs such that they would be suitable to submit a PR to that project. That is not an insignificant amount of work to be honest and I'm a bit thin on time for the next month or two.

### Describe alternatives you've considered

_No response_

### Additional context

See last time we had to update the scripts based on changes:
- https://github.com/apache/datafusion/pull/14901
- https://github.com/apache/datafusion/pull/14824

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Inizia con datafusion/sqllogictest/regenerate_sqlite_files.sh e con la sezione sulla rigenerazione della suite di test SQLite in datafusion/sqllogictest/README.md. Esamina le modifiche e il contesto delle dipendenze nelle PR 14901 e 14824, quindi determina come lo script possa rimanere compatibile con la versione di sqllogictest utilizzata da DataFusion. Il lavoro è completato quando la rigenerazione funziona in modo affidabile senza dipendere da un driver modificato che potrebbe smettere di funzionare dopo gli aggiornamenti delle dipendenze.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
rust, shell, sqlite
Ambito
testing-qa
Tipo di issue
Funzionalità
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.