Skip to content

Commit

Permalink
c
Browse files Browse the repository at this point in the history
  • Loading branch information
nameexhaustion committed Jun 26, 2024
1 parent 958d1c6 commit 03c7d90
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions crates/polars-plan/src/plans/conversion/dsl_to_ir.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ pub fn to_alp_impl(

let hive_parts = if hive_parts.is_some() {
hive_parts
} else if file_options.hive_options.enabled.unwrap() {
} else if file_options.hive_options.enabled.unwrap()
&& file_info.reader_schema.is_some()
{
#[allow(unused_assignments)]
let mut owned = None;

Expand All @@ -163,10 +165,14 @@ pub fn to_alp_impl(
file_info.update_schema_with_hive_schema(hive_schema.clone());
}

file_options.with_columns = maybe_init_projection_excluding_hive(
file_info.reader_schema.as_ref().unwrap(),
hive_parts.as_ref().map(|x| &x[0]),
);
file_options.with_columns = if file_info.reader_schema.is_some() {
maybe_init_projection_excluding_hive(
file_info.reader_schema.as_ref().unwrap(),
hive_parts.as_ref().map(|x| &x[0]),
)
} else {
None
};

if let Some(row_index) = &file_options.row_index {
let schema = Arc::make_mut(&mut file_info.schema);
Expand Down

0 comments on commit 03c7d90

Please sign in to comment.