Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Lordworms committed Feb 12, 2024
1 parent d3e162b commit 7f0f734
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions datafusion/core/src/execution/context/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -942,10 +942,8 @@ impl SessionContext {
// check schema uniqueness
let mut batches = batches.into_iter().peekable();
let schema: SchemaRef = batches.peek().unwrap().schema().clone();
let provider = MemTable::try_new(
schema,
batches.into_iter().map(|batch| vec![batch]).collect(),
)?;
let provider =
MemTable::try_new(schema, batches.map(|batch| vec![batch]).collect())?;
Ok(DataFrame::new(
self.state(),
LogicalPlanBuilder::scan(
Expand Down Expand Up @@ -2169,8 +2167,6 @@ mod tests {
use crate::test;
use crate::test_util::{plan_and_collect, populate_csv_partitions};
use crate::variable::VarType;
use arrow_array::Int32Array;
use arrow_schema::{Field, Schema};
use async_trait::async_trait;
use datafusion_expr::Expr;
use std::env;
Expand Down

0 comments on commit 7f0f734

Please sign in to comment.