Skip to content

Commit 7c3800b

Browse files
committed
refactor: Add content property to DataFile and initialize sin_zero in sockaddr structure
1 parent 12c28fd commit 7c3800b

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

src/iceberg/test/manifest_reader_test.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,8 @@ class TestManifestReader : public testing::TestWithParam<int8_t> {
131131
std::optional<int64_t> content_offset = std::nullopt,
132132
std::optional<int64_t> content_size = std::nullopt) {
133133
return std::make_unique<DataFile>(
134-
DataFile{.file_path = path,
134+
DataFile{.content = content,
135+
.file_path = path,
135136
.file_format = FileFormatType::kParquet,
136137
.partition = partition,
137138
.record_count = 1,

src/iceberg/test/rest_catalog_integration_test.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@ bool CheckServiceReady(uint16_t port) {
8181
.sin_family = AF_INET,
8282
.sin_port = htons(port),
8383
.sin_addr = {.s_addr = htonl(INADDR_LOOPBACK)},
84+
.sin_zero = {},
8485
};
8586
bool result =
8687
(connect(sock, reinterpret_cast<struct sockaddr*>(&addr), sizeof(addr)) == 0);

src/iceberg/test/test_resource.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ static std::string GetResourcePath(const std::string& file_name) {
4040
}
4141

4242
/// \brief Read table metadata from a JSON file and return the Result directly
43-
static Result<std::unique_ptr<TableMetadata>> ReadTableMetadataFromResource(
44-
const std::string& file_name) {
43+
[[maybe_unused]] static Result<std::unique_ptr<TableMetadata>>
44+
ReadTableMetadataFromResource(const std::string& file_name) {
4545
std::filesystem::path path{GetResourcePath(file_name)};
4646
if (!std::filesystem::exists(path)) {
4747
return InvalidArgument("File does not exist: {}", path.string());

0 commit comments

Comments
 (0)