Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion datafusion/core/tests/user_defined/insert_operation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ impl ExecutionPlan for TestInsertExec {
fn make_count_schema() -> SchemaRef {
Arc::new(Schema::new(vec![Field::new(
"count",
DataType::Int64, // should return signed int for snowflake
DataType::UInt64,
false,
)]))
}
3 changes: 1 addition & 2 deletions datafusion/expr/src/logical_plan/dml.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,7 @@ impl Display for InsertOp {

fn make_count_schema() -> DFSchemaRef {
Arc::new(
// should return signed int for snowflake
Schema::new(vec![Field::new("count", DataType::Int64, false)])
Schema::new(vec![Field::new("count", DataType::UInt64, false)])
.try_into()
.unwrap(),
)
Expand Down
6 changes: 3 additions & 3 deletions datafusion/physical-plan/src/insert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ use crate::ExecutionPlanProperties;

use arrow::datatypes::SchemaRef;
use arrow::record_batch::RecordBatch;
use arrow_array::{ArrayRef, Int64Array};
use arrow_array::{ArrayRef, UInt64Array};
use arrow_schema::{DataType, Field, Schema};
use datafusion_common::{internal_err, Result};
use datafusion_execution::TaskContext;
Expand Down Expand Up @@ -261,7 +261,7 @@ impl ExecutionPlan for DataSinkExec {
/// +-------+,
/// ```
fn make_count_batch(count: u64) -> RecordBatch {
let array = Arc::new(Int64Array::from(vec![count as i64])) as ArrayRef;
let array = Arc::new(UInt64Array::from(vec![count])) as ArrayRef;

RecordBatch::try_from_iter_with_nullable(vec![("count", array, false)]).unwrap()
}
Expand All @@ -270,7 +270,7 @@ fn make_count_schema() -> SchemaRef {
// Define a schema.
Arc::new(Schema::new(vec![Field::new(
"count",
DataType::Int64, // should return signed int for snowflake
DataType::UInt64,
false,
)]))
}
Loading