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

[Epic] Data Driven Tests #4460

Closed
27 of 28 tasks
alamb opened this issue Dec 1, 2022 · 14 comments
Closed
27 of 28 tasks

[Epic] Data Driven Tests #4460

alamb opened this issue Dec 1, 2022 · 14 comments
Assignees
Labels
enhancement New feature or request sqllogictest SQL Logic Tests (.slt)

Comments

@alamb
Copy link
Contributor

alamb commented Dec 1, 2022

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
As described in #4248 and implemented in #4395 we now have a sqlogictest based test framework in DataFusion 🎉

This ticket tracks the various follow on work we would like to do

Describe the solution you'd like

Basically we would like to follow the DuckDB variant of sqllogictest as much as possible: https://duckdb.org/dev/sqllogictest/intro

The current rules for verification can be found in: https://duckdb.org/dev/sqllogictest/result_verification

Items

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
cc @mvanschellebeeck @xudong963

@xudong963
Copy link
Member

I'll add more TODOs tomorrow.

@alamb
Copy link
Contributor Author

alamb commented Dec 2, 2022

@xudong963 I think a fun project might be to figure out how to support a minimal implementation of INSERT to insert data. Maybe by implementing something entirely in the sqllogictest harness using ArrayBuilders 🤔 It doesn't have to handle errors well initially or be performant.

I wonder if something crazy like forming a single row record batch from the input, and then concat that batch with any existing batches would be good enough 🤔

@xudong963
Copy link
Member

@alamb Today I have a more crazy idea: we can use Postgres to run create table and insert into ... for DF.

To implement the idea, we can register two DBs for sqllogictest runner, PG and DF.

For pg: we can register Postgres client in our logictest by use tokio_postgres::Client and start Postgres server in docker.

Here is a draft PR to verify if my idea is feasible in sqllogictest-rs: xudong963/sqllogictest-rs#1

@alamb
Copy link
Contributor Author

alamb commented Dec 3, 2022

🤔 I wonder @xudong963 how will inserting data into postgres allow us to insert data into DataFusion 🤔

@alamb
Copy link
Contributor Author

alamb commented Dec 3, 2022

Also, heads up I have some ideas on how to improve the sqllogic framework #4492 (comment)

@xudong963
Copy link
Member

🤔 I wonder @xudong963 how will inserting data into postgres allow us to insert data into DataFusion 🤔

Seems it's impossible, my mistake.

@xudong963
Copy link
Member

xudong963 commented Dec 3, 2022

I wonder if something crazy like forming a single row record batch from the input, and then concat that batch with any existing batches would be good enough 🤔

Make sense to me. But let me think more and find out if there are some other ways.

@mvanschellebeeck
Copy link
Contributor

hey @alamb could you also add #4495 and #4494 as issues under the epic?

@xudong963
Copy link
Member

hey @alamb could you also add #4495 and #4494 as issues under the epic?

added

@xudong963 xudong963 added the sqllogictest SQL Logic Tests (.slt) label Dec 4, 2022
@alamb
Copy link
Contributor Author

alamb commented Dec 4, 2022

Update: check out the insert proposal from @xudong963 here #4496 🥳 🦜

@mvanschellebeeck
Copy link
Contributor

@xudong963 / @alamb - could we also add #4502

@liurenjie1024
Copy link
Contributor

liurenjie1024 commented May 22, 2023

@alamb Please help to add #6405 and assign it to me.

@alamb
Copy link
Contributor Author

alamb commented May 22, 2023

@alamb Please help to add #6405 and assign it to me.

Done @liurenjie1024 -- thank you

@alamb
Copy link
Contributor Author

alamb commented Jun 27, 2023

I think I am going to claim this epic is substantially done so I am closing it out (we have pretty good data driven testing now) The rest of the stragglers I think are tracked in their own tickets without issue

@alamb alamb closed this as completed Jun 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sqllogictest SQL Logic Tests (.slt)
Projects
None yet
Development

No branches or pull requests

4 participants