Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/iceberg/encryption/key_management_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class ICEBERG_EXPORT KeyManagementClient {

/// \brief Initialize the client with the catalog properties.
virtual Status Initialize(
const std::unordered_map<std::string, std::string>& properties) {
const std::unordered_map<std::string, std::string>& /*properties*/) {
return {};
}

Expand All @@ -72,7 +72,7 @@ class ICEBERG_EXPORT KeyManagementClient {
virtual bool SupportsKeyGeneration() const { return false; }

/// \brief Generate a new key in the KMS, returned in plain and wrapped form.
virtual Result<GeneratedKey> GenerateKey(std::string_view wrapping_key_id) {
virtual Result<GeneratedKey> GenerateKey(std::string_view /*wrapping_key_id*/) {
return NotSupported("Key generation is not supported by this KMS client");
}
};
Expand Down
8 changes: 4 additions & 4 deletions src/iceberg/expression/binder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -120,22 +120,22 @@ Result<std::optional<bool>> IsBoundVisitor::Or(const std::optional<bool>& left_r
}

Result<std::optional<bool>> IsBoundVisitor::Predicate(
const std::shared_ptr<BoundPredicate>& pred) {
const std::shared_ptr<BoundPredicate>& /*pred*/) {
return true;
}

Result<std::optional<bool>> IsBoundVisitor::Predicate(
const std::shared_ptr<UnboundPredicate>& pred) {
const std::shared_ptr<UnboundPredicate>& /*pred*/) {
return false;
}

Result<std::optional<bool>> IsBoundVisitor::Aggregate(
const std::shared_ptr<BoundAggregate>& aggregate) {
const std::shared_ptr<BoundAggregate>& /*aggregate*/) {
return true;
}

Result<std::optional<bool>> IsBoundVisitor::Aggregate(
const std::shared_ptr<UnboundAggregate>& aggregate) {
const std::shared_ptr<UnboundAggregate>& /*aggregate*/) {
return false;
}

Expand Down
2 changes: 1 addition & 1 deletion src/iceberg/expression/expression.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ class ICEBERG_EXPORT Expression : public util::Formattable {
/// \brief Returns whether this expression will accept the same values as another.
/// \param other another expression
/// \return true if the expressions are equivalent
virtual bool Equals(const Expression& other) const {
virtual bool Equals(const Expression& /*other*/) const {
// only bound predicates can be equivalent
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions src/iceberg/expression/expression_visitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,13 @@ class ICEBERG_EXPORT BoundVisitor : public ExpressionVisitor<R> {

/// \brief Visit an IS_NAN bound expression.
/// \param expr The bound expression being tested
virtual Result<R> IsNaN(const std::shared_ptr<Bound>& expr) {
virtual Result<R> IsNaN(const std::shared_ptr<Bound>& /*expr*/) {
return NotSupported("IsNaN operation is not supported by this visitor");
}

/// \brief Visit a NOT_NAN bound expression.
/// \param expr The bound expression being tested
virtual Result<R> NotNaN(const std::shared_ptr<Bound>& expr) {
virtual Result<R> NotNaN(const std::shared_ptr<Bound>& /*expr*/) {
return NotSupported("NotNaN operation is not supported by this visitor");
}

Expand Down
3 changes: 2 additions & 1 deletion src/iceberg/expression/expressions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,8 @@ std::shared_ptr<NamedReference> Expressions::Ref(std::string name) {
return ref;
}

Literal Expressions::Lit(Literal::Value value, std::shared_ptr<PrimitiveType> type) {
Literal Expressions::Lit(Literal::Value /*value*/,
std::shared_ptr<PrimitiveType> /*type*/) {
throw ExpressionError("Literal creation is not implemented");
}

Expand Down
6 changes: 3 additions & 3 deletions src/iceberg/expression/literal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -528,7 +528,7 @@ Result<Literal> LiteralCaster::CastFromBinary(
switch (target_type->type_id()) {
case TypeId::kFixed: {
auto target_fixed_type = internal::checked_pointer_cast<FixedType>(target_type);
if (binary_val.size() == target_fixed_type->length()) {
if (binary_val.size() == static_cast<size_t>(target_fixed_type->length())) {
return Literal::Fixed(std::move(binary_val));
}
return InvalidArgument("Failed to cast Binary with length {} to Fixed({})",
Expand Down Expand Up @@ -802,8 +802,8 @@ bool Literal::IsAboveMax() const { return std::holds_alternative<AboveMax>(value
bool Literal::IsNull() const { return std::holds_alternative<std::monostate>(value_); }

bool Literal::IsNaN() const {
return std::holds_alternative<float>(value_) && std::isnan(std::get<float>(value_)) ||
std::holds_alternative<double>(value_) && std::isnan(std::get<double>(value_));
return (std::holds_alternative<float>(value_) && std::isnan(std::get<float>(value_))) ||
(std::holds_alternative<double>(value_) && std::isnan(std::get<double>(value_)));
}

// LiteralCaster implementation
Expand Down
7 changes: 4 additions & 3 deletions src/iceberg/expression/manifest_evaluator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ class ManifestEvalVisitor : public BoundVisitor<bool> {
return kRowsMightMatch;
}

Result<bool> NotEq(const std::shared_ptr<Bound>& expr, const Literal& lit) override {
Result<bool> NotEq(const std::shared_ptr<Bound>& /*expr*/,
const Literal& /*lit*/) override {
// because the bounds are not necessarily a min or max value, this cannot be answered
// using them. notEq(col, X) with (X, Y) doesn't guarantee that X is a value in col.
return kRowsMightMatch;
Expand Down Expand Up @@ -222,8 +223,8 @@ class ManifestEvalVisitor : public BoundVisitor<bool> {
return kRowsMightMatch;
}

Result<bool> NotIn(const std::shared_ptr<Bound>& expr,
const BoundSetPredicate::LiteralSet& literal_set) override {
Result<bool> NotIn(const std::shared_ptr<Bound>& /*expr*/,
const BoundSetPredicate::LiteralSet& /*literal_set*/) override {
// because the bounds are not necessarily a min or max value, this cannot be answered
// using them. notIn(col, {X, ...}) with (X, Y) doesn't guarantee that X is a value in
// col.
Expand Down
2 changes: 1 addition & 1 deletion src/iceberg/expression/projections.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class ProjectionVisitor : public ExpressionVisitor<std::shared_ptr<Expression>>
Result<std::shared_ptr<Expression>> AlwaysFalse() override { return False::Instance(); }

Result<std::shared_ptr<Expression>> Not(
const std::shared_ptr<Expression>& child_result) override {
const std::shared_ptr<Expression>& /*child_result*/) override {
return InvalidExpression("Project called on expression with a not");
}

Expand Down
2 changes: 1 addition & 1 deletion src/iceberg/file_io.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ class ICEBERG_EXPORT FileIO {
///
/// \param file_location The location of the file to delete.
/// \return void if the delete succeeded, an error code if the delete failed.
virtual Status DeleteFile(const std::string& file_location) {
virtual Status DeleteFile(const std::string& /*file_location*/) {
return NotImplemented("DeleteFile not implemented");
}

Expand Down
5 changes: 3 additions & 2 deletions src/iceberg/util/executor_util_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,10 @@ auto ParallelCollect(OptionalExecutor executor, Args&&... args) {
return {};
});
} else {
group.Submit([&, item = std::move(item)]() mutable -> Status {
group.Submit([&, moved_item = std::move(item)]() mutable -> Status {
ICEBERG_ASSIGN_OR_RAISE(
value, std::invoke(std::get<I * 2 + 1>(args_tuple), std::move(item)));
value,
std::invoke(std::get<I * 2 + 1>(args_tuple), std::move(moved_item)));
return {};
});
}
Expand Down
Loading