Skip to content

Commit

Permalink
blaze: make parquet reader components public
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangli20 committed Dec 21, 2024
1 parent 9d933f0 commit 084345e
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ impl FileScanConfig {
)
}

pub(crate) fn file_column_projection_indices(&self) -> Option<Vec<usize>> {
pub fn file_column_projection_indices(&self) -> Option<Vec<usize>> {
self.projection.as_ref().map(|p| {
p.iter()
.filter(|col_idx| **col_idx < self.file_schema.fields().len())
Expand Down
4 changes: 2 additions & 2 deletions datafusion/core/src/datasource/physical_plan/parquet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ use log::debug;
mod access_plan;
mod metrics;
mod opener;
mod page_filter;
pub mod page_filter;
mod reader;
mod row_filter;
mod row_group_filter;
Expand All @@ -59,7 +59,7 @@ use crate::datasource::schema_adapter::{
};
pub use access_plan::{ParquetAccessPlan, RowGroupAccess};
pub use metrics::ParquetFileMetrics;
use opener::ParquetOpener;
pub use opener::ParquetOpener;
pub use reader::{DefaultParquetFileReaderFactory, ParquetFileReaderFactory};
pub use writer::plan_to_parquet;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ use parquet::arrow::{ParquetRecordBatchStreamBuilder, ProjectionMask};
use std::sync::Arc;

/// Implements [`FileOpener`] for a parquet file
pub(super) struct ParquetOpener {
pub struct ParquetOpener {
pub partition_index: usize,
pub projection: Arc<[usize]>,
pub batch_size: usize,
Expand Down
4 changes: 2 additions & 2 deletions datafusion/core/src/datasource/schema_adapter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,9 +173,9 @@ impl SchemaAdapter for DefaultSchemaAdapter {
#[derive(Debug)]
pub struct SchemaMapping {
/// The schema of the table. This is the expected schema after conversion and it should match the schema of the query result.
table_schema: SchemaRef,
pub table_schema: SchemaRef,
/// Mapping from field index in `table_schema` to index in projected file_schema
field_mappings: Vec<Option<usize>>,
pub field_mappings: Vec<Option<usize>>,
}

impl SchemaMapper for SchemaMapping {
Expand Down

0 comments on commit 084345e

Please sign in to comment.