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

Test DDL #161

Merged
Merged

Conversation

matthewmturner
Copy link
Collaborator

@matthewmturner matthewmturner commented Sep 23, 2024

This adds test for running AppEvent::ExecuteDDL and then running query to make sure the DDL statements were correctly processed.

Unfortunately, this isnt a proper end to end test like I was hoping. It was surprisingly difficult to get the app event loop to run in the test which is required to get that to work. So, we simply execute a query directly on the context instead.

@matthewmturner matthewmturner linked an issue Sep 23, 2024 that may be closed by this pull request
@matthewmturner matthewmturner changed the title Start testing DDL Test DDL Sep 23, 2024
Comment on lines -34 to -41
pub struct Query {
sql: String,
results: Option<Vec<RecordBatch>>,
num_rows: Option<usize>,
error: Option<String>,
execution_time: Duration,
execution_stats: Option<ExecutionStats>,
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Query was no longer used

query_results_state: Option<RefCell<TableState>>,
result_batches: Option<Vec<RecordBatch>>,
results_page: Option<usize>,
execution_error: Option<ExecutionError>,
execution_task: Option<JoinHandle<Result<()>>>,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Playing with the test code made me realize this would be useful to have for long running queries.

@matthewmturner matthewmturner marked this pull request as ready for review September 24, 2024 04:24
@matthewmturner matthewmturner merged commit 16897dc into datafusion-contrib:main Sep 24, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

To investigate: Is DDL working correctly?
1 participant