Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche committed Dec 6, 2023
1 parent bd8f127 commit 4205837
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cpp/src/arrow/dataset/file_parquet.cc
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,8 @@ std::optional<compute::Expression> ParquetFileFragment::EvaluateStatisticsAsExpr
std::optional<compute::Expression> ParquetFileFragment::EvaluateStatisticsAsExpression(
const Field& field, const parquet::Statistics& statistics) {
const auto field_name = field.name();
return EvaluateStatisticsAsExpression(field, FieldRef(field_name), statistics);
return EvaluateStatisticsAsExpression(field, FieldRef(std::move(field_name)),
statistics);
}

ParquetFileFormat::ParquetFileFormat()
Expand Down Expand Up @@ -902,11 +903,11 @@ Result<std::vector<compute::Expression>> ParquetFileFragment::TestRowGroups(
return std::vector<compute::Expression>{};
}

const SchemaField* schema_field = nullptr;
for (const FieldRef& ref : FieldsInExpression(predicate)) {
ARROW_ASSIGN_OR_RAISE(auto match, ref.FindOneOrNone(*physical_schema_));

if (match.empty()) continue;
schema_field = &manifest_->schema_fields[match[0]];
const SchemaField* schema_field = &manifest_->schema_fields[match[0]];

for (size_t i = 1; i < match.indices().size(); ++i) {
if (schema_field->field->type()->id() != Type::STRUCT) {
Expand Down

0 comments on commit 4205837

Please sign in to comment.