xudong963 commented on code in PR #4496:
URL: https://github.com/apache/arrow-datafusion/pull/4496#discussion_r1038967881
##########
datafusion/core/tests/sqllogictests/src/main.rs:
##########
@@ -138,7 +140,14 @@ fn format_batches(batches: &[RecordBatch]) ->
Result<String> {
}
async fn run_query(ctx: &SessionContext, sql: impl Into<String>) ->
Result<String> {
- let df = ctx.sql(&sql.into()).await.unwrap();
+ let sql = sql.into();
+ // Check if the sql is `insert`
+ if sql.trim_start().to_lowercase().starts_with("insert") {
+ // Process the insert statement
+ insert(ctx, sql).await?;
+ return Ok("".to_string());
+ }
Review Comment:
Yes, more generic way, will fix in next PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]