Skip to content

Commit 70be2c6

Browse files
adriangbclaude
authored andcommitted
Fix predicate simplification for incompatible types in push_down_filter (#17521)
* Fix predicate simplification for incompatible types in push_down_filter Handle the case where scalar values with incompatible types (e.g., TimestampMicrosecond vs Time64Nanosecond) cannot be compared during predicate simplification. The fix catches the comparison error in find_most_restrictive_predicate and returns None to indicate we can't simplify when types are incompatible, preventing the "Uncomparable values" error. Fixes #17512 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com> * minimize diff * use proposed fix, add test * revert other changes --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 1d5fdb3 commit 70be2c6

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

datafusion/common/src/file_options/parquet_writer.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ impl TryFrom<&TableParquetOptions> for WriterPropertiesBuilder {
166166
}
167167
}
168168

169-
170169
impl ParquetOptions {
171170
/// Convert the global session options, [`ParquetOptions`], into a single write action's [`WriterPropertiesBuilder`].
172171
///
@@ -502,7 +501,7 @@ mod tests {
502501
EnabledStatistics::Chunk => "chunk",
503502
EnabledStatistics::Page => "page",
504503
}
505-
.into(),
504+
.into(),
506505
),
507506
bloom_filter_fpp: bloom_filter_default_props.map(|p| p.fpp),
508507
bloom_filter_ndv: bloom_filter_default_props.map(|p| p.ndv),
@@ -647,7 +646,7 @@ mod tests {
647646
COL_NAME.into(),
648647
column_options_with_non_defaults(&parquet_options),
649648
)]
650-
.into(),
649+
.into(),
651650
key_value_metadata: [(key, value)].into(),
652651
crypto: Default::default(),
653652
};

0 commit comments

Comments
 (0)