Skip to content
2 changes: 2 additions & 0 deletions src/iceberg/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -330,11 +330,13 @@ if(ICEBERG_BUILD_BUNDLE)
avro/avro_schema_util.cc
avro/avro_stream_internal.cc
parquet/parquet_data_util.cc
parquet/parquet_dictionary_row_group_filter.cc
parquet/parquet_metrics.cc
parquet/parquet_metrics_row_group_filter.cc
parquet/parquet_reader.cc
parquet/parquet_register.cc
parquet/parquet_schema_util.cc
parquet/parquet_value_util.cc
parquet/parquet_writer.cc
parquet/row_number_reader.cc)

Expand Down
17 changes: 14 additions & 3 deletions src/iceberg/expression/expression_visitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@

#include <concepts>
#include <memory>
#include <string>
#include <typeinfo>
#include <variant>

#include "iceberg/expression/aggregate.h"
#include "iceberg/expression/expression.h"
Expand All @@ -33,6 +35,7 @@
#include "iceberg/expression/term.h"
#include "iceberg/iceberg_export.h"
#include "iceberg/result.h"
#include "iceberg/type.h"
#include "iceberg/util/checked_cast.h"
#include "iceberg/util/macros.h"

Expand Down Expand Up @@ -233,9 +236,17 @@ class ICEBERG_EXPORT BoundVisitor : public ExpressionVisitor<R> {
case Expression::Operation::kNotEq:
return NotEq(pred->term(), literal_pred.literal());
case Expression::Operation::kStartsWith:
return StartsWith(pred->term(), literal_pred.literal());
case Expression::Operation::kNotStartsWith:
return NotStartsWith(pred->term(), literal_pred.literal());
case Expression::Operation::kNotStartsWith: {
const auto& prefix = literal_pred.literal();
if (pred->term()->type()->type_id() != TypeId::kString ||
!std::holds_alternative<std::string>(prefix.value())) {
return InvalidExpression("{} requires a string term and a string prefix",
ToString(pred->op()));
}
return pred->op() == Expression::Operation::kStartsWith
? StartsWith(pred->term(), prefix)
: NotStartsWith(pred->term(), prefix);
}
default:
return InvalidExpression("Invalid operation for BoundLiteralPredicate: {}",
ToString(pred->op()));
Expand Down
2 changes: 1 addition & 1 deletion src/iceberg/file_reader.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class ICEBERG_EXPORT ReaderProperties : public ConfigBase<ReaderProperties> {
/// \brief Validate Arrow batches before merge-on-read projection.
/// Default: true. Disable only when the reader is trusted to produce valid arrays.
inline static Entry<bool> kArrowValidateBatch{"read.arrow.validate-batch", true};
/// \brief Use footer statistics to prune Parquet row groups.
/// \brief Use footer statistics and dictionaries to prune Parquet row groups.
inline static Entry<bool> kParquetRowGroupFilter{
"read.parquet.row-group-filter.enabled", true};
/// \brief Skip GenericDatum in Avro reader for better performance.
Expand Down
Loading
Loading