Skip to content

Commit

Permalink
Avoid applying bloom filters if we are casting columns
Browse files Browse the repository at this point in the history
  • Loading branch information
Mytherin committed Feb 11, 2025
1 parent d769821 commit a54c946
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion extension/parquet/parquet_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -873,7 +873,8 @@ void ParquetReader::PrepareRowGroupBuffer(ParquetReaderScanState &state, idx_t c
// TODO we might not have stats but STILL a bloom filter so move this up
// check the bloom filter if present
bool is_generated_column = column_reader.ColumnIndex() >= group.columns.size();
if (!column_reader.Type().IsNested() && !is_generated_column &&
bool is_cast = column_reader.Schema().schema_type == ::duckdb::ParquetColumnSchemaType::CAST;
if (!column_reader.Type().IsNested() && !is_generated_column && !is_cast &&
ParquetStatisticsUtils::BloomFilterSupported(column_reader.Type().id()) &&
ParquetStatisticsUtils::BloomFilterExcludes(filter,
group.columns[column_reader.ColumnIndex()].meta_data,
Expand Down

0 comments on commit a54c946

Please sign in to comment.