Skip to content

Commit f8da122

Browse files
committed
fix test
1 parent fb7e319 commit f8da122

3 files changed

Lines changed: 1 addition & 26 deletions

File tree

  • test
    • inte
    • test_data
      • orc/blob_desc_field_with_external_path.db/blob_desc_field_with_external_path
      • parquet/blob_desc_field_with_external_path.db/blob_desc_field_with_external_path

test/inte/blob_table_inte_test.cpp

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -366,16 +366,6 @@ class BlobTableInteTest : public testing::Test, public ::testing::WithParamInter
366366
return PathUtil::JoinPath(rewrite.table_path, relative_blob_path);
367367
}
368368
}
369-
370-
std::string file_name = PathUtil::GetName(descriptor_uri);
371-
for (const auto& blob_dir : rewrite.table_relative_blob_dirs) {
372-
std::string candidate =
373-
PathUtil::JoinPath(PathUtil::JoinPath(rewrite.table_path, blob_dir), file_name);
374-
auto exists = fs->Exists(candidate);
375-
if (exists.ok() && exists.value()) {
376-
return candidate;
377-
}
378-
}
379369
return std::nullopt;
380370
}
381371

@@ -2131,12 +2121,7 @@ TEST_P(BlobTableInteTest, TestBlobDescriptorFieldPartialExternalStorageNoAsDescr
21312121
auto read_concat = arrow::Concatenate(result.chunked_array->chunks()).ValueOrDie();
21322122
auto read_struct = std::dynamic_pointer_cast<arrow::StructArray>(read_concat);
21332123

2134-
// After read, b0 and b1 are both descriptor-stored; resolve all back to raw bytes.
2135-
// Java-generated descriptors may contain absolute paths from the generation machine.
2136-
// Rewrite them to the portable blob directories inside the copied table path.
2137-
BlobDescriptorPathRewrite rewrite{table_path, {"raw_blob", "external_blob"}};
2138-
ASSERT_OK_AND_ASSIGN(auto resolved,
2139-
ConvertDescriptorToRawBlob(read_struct, {"b0", "b1"}, rewrite));
2124+
ASSERT_OK_AND_ASSIGN(auto resolved, ConvertDescriptorToRawBlob(read_struct, {"b0", "b1"}));
21402125
ASSERT_OK_AND_ASSIGN(auto expected_with_rk, PrependRowKindColumn(raw_array));
21412126
ASSERT_TRUE(resolved->Equals(expected_with_rk));
21422127

test/test_data/orc/blob_desc_field_with_external_path.db/blob_desc_field_with_external_path/README

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ Add: 2, "img_1", "vid_1", "raw_2_1", null
2323
Add: 3, "img_2", null, "raw_2_2", "raw_3_2"
2424
NoCompact
2525

26-
Expected data files after commit:
27-
[0] main orc file (f0, b0, b1), 3 rows
28-
[1] .blob file (b2), 3 rows
29-
[2] .blob file (b3), 3 rows
30-
3126
C++ read note:
3227
Descriptor URIs contain absolute paths from the Java generation machine.
3328
ConvertDescriptorToRawBlob uses BlobDescriptorPathRewrite{"raw_blob", "external_blob"}

test/test_data/parquet/blob_desc_field_with_external_path.db/blob_desc_field_with_external_path/README

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ Add: 2, "img_1", "vid_1", "raw_2_1", null
2323
Add: 3, "img_2", null, "raw_2_2", "raw_3_2"
2424
NoCompact
2525

26-
Expected data files after commit:
27-
[0] main orc file (f0, b0, b1), 3 rows
28-
[1] .blob file (b2), 3 rows
29-
[2] .blob file (b3), 3 rows
30-
3126
C++ read note:
3227
Descriptor URIs contain absolute paths from the Java generation machine.
3328
ConvertDescriptorToRawBlob uses BlobDescriptorPathRewrite{"raw_blob", "external_blob"}

0 commit comments

Comments
 (0)