apache / apache/datafusion-sqlparser-rs
Seemingly pointless test
- Linguagem predominante
- Rust
- Estrelas
- 3.5k
- Forks
- 772
- Merge médio
- 4d 9h
- PRs com merge (30d)
- 17
Descrição
While implementing the support for [`INHERITS`](https://www.postgresql.org/docs/current/ddl-inherit.html), I happened to find [this test](https://github.com/jmhain/sqlparser-rs/blob/7723ea56c5119c7d1a15233c18eb2aaf48b60dc0/tests/sqlparser_postgres.rs#L505-L515) which contains in its name the word `inherit` and I suppose may reference the [CREATE ROLE INHERIT](https://www.postgresql.org/docs/current/sql-createrole.html), but it not present in the actual test.
If this test is actually pointless, it may be best to remove it. Do let me know how to proceed.
```rust
#[test]
fn parse_create_table_with_inherit() {
let sql = "\
CREATE TABLE bazaar.settings (\
settings_id UUID PRIMARY KEY DEFAULT uuid_generate_v4() NOT NULL, \
user_id UUID UNIQUE, \
value TEXT[], \
use_metric BOOLEAN DEFAULT true\
)";
pg().verified_stmt(sql);
}
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Direção de pesquisa
Comece pelas linhas 505-515 de tests/sqlparser_postgres.rs e compare o nome do teste com o SQL que ele analisa, especialmente as referências a PostgreSQL INHERITS e CREATE ROLE INHERIT na issue. Confirme se o teste cobre o comportamento pretendido; considera-se concluído quando o teste é removido ou renomeado de forma consistente e os testes relevantes de Rust passam.
Escrita pelo modelo de indexação a partir do texto da issue.
Avaliação
- Stack de tecnologia
- rust
- Domínio
- testing-qa
- Tipo de issue
- Refatoração
- Dificuldade
- 2/5
- Tempo estimado
- 1-3 horas
- Status de atividade
- Estagnada
- Clareza
- Razoavelmente clara
- Facilidade para iniciantes
- 45/100