@@ -427,6 +427,39 @@ TEST_F(ConflictDetectionTest, TestDeletionVectorsNotSupportedWithBucketUnawareMo
427427 " not yet support dv with BUCKET_UNAWARE mode" );
428428}
429429
430+ TEST_F (ConflictDetectionTest,
431+ TestDeletionVectorsNotSupportedWithResolvedBucketUnawareModeFromMinusOne) {
432+ ASSERT_OK_AND_ASSIGN (
433+ std::shared_ptr<TableSchema> table_schema,
434+ TableSchema::Create (/* schema_id=*/ 0 , arrow::schema (fields_), /* partition_keys=*/ {" f1" },
435+ /* primary_keys=*/ {}, /* options=*/ {}));
436+ ASSERT_OK_AND_ASSIGN (CoreOptions core_options,
437+ CoreOptions::FromMap ({{Options::BUCKET , " -1" },
438+ {Options::DELETION_VECTORS_ENABLED , " true" }}));
439+ ConflictDetection detection (table_schema, core_options, nullptr , nullptr , nullptr );
440+
441+ ASSERT_NOK_WITH_MSG (CheckConflicts (detection, /* base_entries=*/ {}, /* delta_entries=*/ {},
442+ Snapshot::CommitKind::Append ()),
443+ " not yet support dv with BUCKET_UNAWARE mode" );
444+ }
445+
446+ TEST_F (ConflictDetectionTest, TestDeletionVectorsAllowedWithResolvedDynamicBucketMode) {
447+ auto fields = {arrow::field (" f0" , arrow::int32 (), /* nullable=*/ false ),
448+ arrow::field (" f1" , arrow::int32 (), /* nullable=*/ false ),
449+ arrow::field (" f2" , arrow::int32 ())};
450+ ASSERT_OK_AND_ASSIGN (
451+ std::shared_ptr<TableSchema> table_schema,
452+ TableSchema::Create (/* schema_id=*/ 0 , arrow::schema (fields), /* partition_keys=*/ {" f1" },
453+ /* primary_keys=*/ {" f1" , " f0" }, {{Options::BUCKET , " -1" }}));
454+ ASSERT_OK_AND_ASSIGN (CoreOptions core_options,
455+ CoreOptions::FromMap ({{Options::BUCKET , " -1" },
456+ {Options::DELETION_VECTORS_ENABLED , " true" }}));
457+ ConflictDetection detection (table_schema, core_options, nullptr , nullptr , nullptr );
458+
459+ ASSERT_OK (CheckConflicts (detection, /* base_entries=*/ {}, /* delta_entries=*/ {},
460+ Snapshot::CommitKind::Append ()));
461+ }
462+
430463TEST_F (ConflictDetectionTest, TestCheckLsmKeyRangeConflict) {
431464 auto fields = {arrow::field (" f0" , arrow::int32 (), /* nullable=*/ false ),
432465 arrow::field (" f1" , arrow::int32 (), /* nullable=*/ false ),
0 commit comments