apache / apache/datafusion-sqlparser-rs
Create test pattern for Spans
- Langage dominant
- Rust
- Étoiles
- 3.5k
- Forks
- 772
- Merge moyen
- 4 j 9 h
- PR mergées (30 j)
- 17
Description
Part of https://github.com/apache/datafusion-sqlparser-rs/issues/1548
# Usecase
- We have added span information in https://github.com/apache/datafusion-sqlparser-rs/pull/1435
We would like to add span information through out the rest of the AST structures (see docs in https://github.com/apache/datafusion-sqlparser-rs/pull/1549) and list on https://github.com/apache/datafusion-sqlparser-rs/issues/1548
In order to support this feature reasonably, we need to be able to test the feature and avoid regressions
# Proposal
I think we need some sort of span test.
I recommend
1. A new test binary like `tests/sqlparser_spans.rs`
Then add a test that
1. Parses a SQL string
2. Check the spans of the AST nodes match what is expected
I think we'll have to use judgement on how fine grained the location information
can / should be.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Lisez le contexte des issues 1548 et 1563, ainsi que des PRs 1435 et 1549, afin de comprendre les informations de span existantes et la couverture AST prévue. Commencez par le point d’entrée proposé tests/sqlparser_spans.rs pour les tests : analysez des chaînes SQL représentatives et comparez les spans des nœuds AST avec les emplacements attendus. Le travail est considéré comme terminé lorsque le comportement des spans est couvert par des tests et que les régressions peuvent être détectées.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- rust
- Domaine
- compilers, testing
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 42/100