diff --git a/datafusion/core/tests/user_defined/insert_operation.rs b/datafusion/core/tests/user_defined/insert_operation.rs index 24dfcbfcf66d..ff14fa0be3fb 100644 --- a/datafusion/core/tests/user_defined/insert_operation.rs +++ b/datafusion/core/tests/user_defined/insert_operation.rs @@ -1,3 +1,20 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + use std::{any::Any, sync::Arc}; use arrow_schema::{DataType, Field, Schema, SchemaRef}; @@ -20,16 +37,16 @@ async fn insert_operation_is_passed_correctly_to_table_provider() { .unwrap(); let sql = "INSERT INTO testing (column) VALUES (1)"; - assert_insert_op(&ctx, &sql, InsertOp::Append).await; + assert_insert_op(&ctx, sql, InsertOp::Append).await; let sql = "INSERT OVERWRITE testing (column) VALUES (1)"; - assert_insert_op(&ctx, &sql, InsertOp::Overwrite).await; + assert_insert_op(&ctx, sql, InsertOp::Overwrite).await; let sql = "REPLACE INTO testing (column) VALUES (1)"; - assert_insert_op(&ctx, &sql, InsertOp::Replace).await; + assert_insert_op(&ctx, sql, InsertOp::Replace).await; let sql = "INSERT OR REPLACE INTO testing (column) VALUES (1)"; - assert_insert_op(&ctx, &sql, InsertOp::Replace).await; + assert_insert_op(&ctx, sql, InsertOp::Replace).await; } async fn assert_insert_op(ctx: &SessionContext, sql: &str, insert_op: InsertOp) { @@ -46,6 +63,7 @@ fn session_ctx_with_dialect(dialect: impl Into) -> SessionContext { SessionContext::new_with_config(config) } +#[derive(Debug)] struct TestInsertTableProvider { schema: SchemaRef, }