Skip to content

Commit c6c1a1f

Browse files
committed
fix some comments
1 parent d71c26a commit c6c1a1f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/iceberg/result.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ namespace iceberg {
3131
enum class ErrorKind {
3232
kAlreadyExists,
3333
kCommitStateUnknown,
34-
kDataInvalid,
3534
kInvalidArgument,
35+
kInvalidData,
3636
kInvalidExpression,
3737
kInvalidSchema,
3838
kIOError,
@@ -66,15 +66,15 @@ using Status = Result<void>;
6666
/// \brief Macro to define error creation functions
6767
#define DEFINE_ERROR_FUNCTION(name) \
6868
template <typename... Args> \
69-
inline auto name(const std::format_string<Args...> fmt, Args&&... args) \
70-
-> unexpected<Error> { \
69+
inline auto name(const std::format_string<Args...> fmt, \
70+
Args&&... args) -> unexpected<Error> { \
7171
return unexpected<Error>( \
7272
{ErrorKind::k##name, std::format(fmt, std::forward<Args>(args)...)}); \
7373
}
7474

7575
DEFINE_ERROR_FUNCTION(AlreadyExists)
7676
DEFINE_ERROR_FUNCTION(CommitStateUnknown)
77-
DEFINE_ERROR_FUNCTION(DataInvalid)
77+
DEFINE_ERROR_FUNCTION(InvalidData)
7878
DEFINE_ERROR_FUNCTION(InvalidArgument)
7979
DEFINE_ERROR_FUNCTION(InvalidExpression)
8080
DEFINE_ERROR_FUNCTION(InvalidSchema)

src/iceberg/table_scan.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ Result<std::unique_ptr<TableScan>> TableScanBuilder::Build() {
6060
if (auto it = schemas.find(*snapshot->schema_id); it != schemas.end()) {
6161
return it->second;
6262
}
63-
return DataInvalid("Schema {} in snapshot {} is not found", *snapshot->schema_id,
63+
return InvalidData("Schema {} in snapshot {} is not found", *snapshot->schema_id,
6464
snapshot->snapshot_id);
6565
}
6666
return table_.schema();

0 commit comments

Comments
 (0)