Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sqllogictest for modeling-rs end-to-end test #604

Merged

Conversation

goldmedal
Copy link
Contributor

@goldmedal goldmedal commented Jun 7, 2024

Description

Basically, I copied the sqllogictest in DataFusion as our testing framework. Just remove the postgres test and the test cases.
The e2e test uses DataFusion as the query runner. So I also registered the MDL dataset before running tests.

You can run this e2e test by the command

cargo test --test sqllogictests

Follow-up issues

}
}

pub async fn register_ecommerce_table(test_ctx: &TestContext) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I created and registered the ecommerce case here.

Comment on lines +159 to +162
ctx.state().with_analyzer_rules(vec![
Arc::new(ModelAnalyzeRule::new(Arc::clone(&analyzed_mdl))),
Arc::new(ModelGenerationRule::new(Arc::clone(&analyzed_mdl))),
]);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I registered the wren analysis rule here.

@@ -0,0 +1,2 @@
statement ok
SELECT * from orders
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This test should be SELECT * from wrenai.default.orders actually.
There is an issue about analyzing a qualified table name. I'll address this in next PR.

@goldmedal goldmedal force-pushed the modeling-rs/feature/sqllogictest-e2e branch from 12d7d28 to 86be1cf Compare June 11, 2024 06:55
Copy link
Contributor

@grieve54706 grieve54706 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@grieve54706 grieve54706 merged commit 6d8dda7 into Canner:main Jun 11, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants