Skip to content

Commit

Permalink
add schema method
Browse files Browse the repository at this point in the history
  • Loading branch information
emgeee committed Aug 12, 2024
1 parent e1234dd commit c6ef592
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions crates/core/src/datastream.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use futures::StreamExt;
use std::{sync::Arc, time::Duration};

use datafusion::common::{DataFusionError, Result};
use datafusion::common::{DFSchema, DataFusionError, Result};
pub use datafusion::dataframe::DataFrame;
use datafusion::dataframe::DataFrameWriteOptions;
use datafusion::execution::SendableRecordBatchStream;
Expand All @@ -19,7 +19,8 @@ pub struct DataStream {
}

impl DataStream {
pub fn schema(&self) -> Result<Self> {
pub fn schema(&self) -> &DFSchema {
self.df.schema()
}

pub fn filter(&self, predicate: Expr) -> Result<Self> {
Expand Down

0 comments on commit c6ef592

Please sign in to comment.