apache / apache/datafusion-sqlparser-rs

Seemingly pointless test

Open
#1,807 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
3.5k
Forks
772
Avg merge
4d 9h
Merged PRs (30d)
17

Description

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);
}

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with tests/sqlparser_postgres.rs lines 505-515 and compare the test name with the SQL it parses, particularly the PostgreSQL INHERITS and CREATE ROLE INHERIT references in the issue. Confirm whether the test covers the intended behavior; done means the test is removed or renamed consistently, with the relevant Rust tests passing.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
testing-qa
Issue type
Refactor
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.