Skip to content

Commit

Permalink
chore: remove schema conversion in scan
Browse files Browse the repository at this point in the history
  • Loading branch information
roeap committed May 1, 2023
1 parent 84d35f8 commit d64c475
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions rust/src/delta_datafusion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ use std::sync::Arc;

use arrow::array::ArrayRef;
use arrow::compute::{cast_with_options, CastOptions};
use arrow::datatypes::{
DataType as ArrowDataType, Field as ArrowField, Schema as ArrowSchema, SchemaRef, TimeUnit,
};
use arrow::datatypes::{DataType as ArrowDataType, Schema as ArrowSchema, SchemaRef, TimeUnit};
use arrow::error::ArrowError;
use arrow::record_batch::RecordBatch;
use async_trait::async_trait;
Expand Down Expand Up @@ -377,21 +375,6 @@ impl TableProvider for DeltaTable {
.physical_arrow_schema(self.object_store())
.await?;

let schema = Arc::new(ArrowSchema::new(
schema
.fields()
.iter()
.map(|field| match field.data_type() {
ArrowDataType::Timestamp(TimeUnit::Microsecond, tz) => ArrowField::new(
field.name().clone(),
ArrowDataType::Timestamp(TimeUnit::Nanosecond, tz.clone()),
field.is_nullable(),
),
_ => field.clone(),
})
.collect(),
));

register_store(self, session.runtime_env().clone());

let filter_expr = conjunction(filters.iter().cloned())
Expand Down

0 comments on commit d64c475

Please sign in to comment.