Skip to content

Commit 5998dbf

Browse files
morningmanhubgeterclaude
committed
[test](iceberg) Port the branch-4.1 Iceberg V3 default tests and reserve TIcebergFileDesc field 13
### What problem does this PR solve? Issue Number: None Related PR: #66538 #65851 Problem Summary: branch-4.1 #66538 and master #65851 implement Iceberg V3 initial / write defaults separately. The 4.1 tests target fe-core classes and V1 reader internals that master moved into the fe-connector-iceberg plugin and iceberg_reader_mixin.h, so most of them never reached master. Comparing the two, master already implements much of the tested behavior but has no test for it: equality-delete schema carriers for dropped keys, the missing-required-field and nested-default fences, the commit fences that reject schema / spec / table-identity changes between binding and commit, pinned writer metadata in merge sinks and file conversion, typed write-default SQL, and DEFAULT resolution by field id. This adds master versions of those tests (BE: 3, FE: 37) and one regression check that information_schema does not expose a connector write default. It also reserves field id 13 of TIcebergFileDesc: branch-4.1 / branch-4.2 send `13: optional ExternalTableSchema.TSchema equality_delete_schema` there, so master must never reuse it. No product code changes. The behavior differences found by the same comparison are fixed separately (for example #69369). ### Release note None ### Check List (For Author) - Test: Unit Test, Regression test - BE UT: IcebergV2ReaderTest.IcebergProjectedStructDoesNotReuseReaddedEqualityKeyByName, ParquetReadLinesTest.iceberg_row_id_fetch_materializes_readded_missing_column, VOrcTransformerTest.SkipsInvalidBinaryChildrenHiddenByNullableCollections pass (run on a 10-20 master base; the BE files master changed since do not touch these paths) - FE UT: fe-connector-iceberg module 1656 tests pass; fe-core ConnectorWriteSchemaUtilsTest, ExternalRowLevelUpdatePlanBuilderTest, ExternalRowLevelMergePlanBuilderTest pass; the fence / pinned-metadata tests were checked to fail with the guarded condition removed - Regression: external_table_p0/iceberg/test_iceberg_write_default passes (.out generated by script) - Behavior changed: No - Does this need documentation: No Co-authored-by: daidai <[email protected]> Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent 85adcce commit 5998dbf

15 files changed

Lines changed: 1616 additions & 0 deletions

File tree

‎be/test/format/parquet/parquet_read_lines.cpp‎

Lines changed: 147 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
#include "exprs/vexpr_context.h"
4343
#include "format/orc/vorc_reader.h"
4444
#include "format/parquet/vparquet_reader.h"
45+
#include "format/table/iceberg_scan_semantics.h"
4546
#include "gtest/gtest_pred_impl.h"
4647
#include "io/fs/local_file_system.h"
4748
#include "orc/sargs/SearchArgument.hh"
@@ -322,4 +323,150 @@ TEST_F(ParquetReadLinesTest, test4) {
322323
read_parquet_lines(numeric_types, types, read_lines, block_dump);
323324
}
324325

326+
TEST_F(ParquetReadLinesTest, iceberg_row_id_fetch_materializes_readded_missing_column) {
327+
TDescriptorTable thrift_desc;
328+
TTableDescriptor table_desc;
329+
table_desc.__set_id(0);
330+
table_desc.__set_tableType(TTableType::OLAP_TABLE);
331+
table_desc.__set_numCols(0);
332+
table_desc.__set_numClusteringCols(0);
333+
thrift_desc.tableDescriptors.push_back(table_desc);
334+
thrift_desc.__isset.tableDescriptors = true;
335+
336+
const std::vector<std::tuple<std::string, int32_t, TPrimitiveType::type>> columns {
337+
{"new_name", 2, TPrimitiveType::STRING},
338+
{"data", 3, TPrimitiveType::STRING},
339+
{"id", 4, TPrimitiveType::INT},
340+
};
341+
for (size_t index = 0; index < columns.size(); ++index) {
342+
const auto& [name, field_id, primitive_type] = columns[index];
343+
TTypeNode type_node;
344+
type_node.__set_type(TTypeNodeType::SCALAR);
345+
TScalarType scalar_type;
346+
scalar_type.__set_type(primitive_type);
347+
type_node.__set_scalar_type(scalar_type);
348+
TTypeDesc type;
349+
type.types.push_back(type_node);
350+
351+
TSlotDescriptor slot;
352+
slot.__set_id(cast_set<int32_t>(index));
353+
slot.__set_parent(0);
354+
slot.__set_slotType(type);
355+
slot.__set_columnPos(cast_set<int32_t>(index));
356+
slot.__set_byteOffset(0);
357+
slot.__set_nullIndicatorByte(0);
358+
slot.__set_nullIndicatorBit(cast_set<int32_t>(index));
359+
slot.__set_colName(name);
360+
slot.__set_slotIdx(cast_set<int32_t>(index));
361+
slot.__set_isMaterialized(true);
362+
slot.__set_col_unique_id(field_id);
363+
thrift_desc.slotDescriptors.push_back(slot);
364+
}
365+
thrift_desc.__isset.slotDescriptors = true;
366+
367+
TTupleDescriptor tuple;
368+
tuple.__set_id(0);
369+
tuple.__set_byteSize(16);
370+
tuple.__set_numNullBytes(1);
371+
tuple.__set_tableId(0);
372+
tuple.__isset.tableId = true;
373+
thrift_desc.tupleDescriptors.push_back(tuple);
374+
375+
ObjectPool object_pool;
376+
DescriptorTbl* desc_tbl = nullptr;
377+
ASSERT_TRUE(DescriptorTbl::create(&object_pool, thrift_desc, &desc_tbl).ok());
378+
auto* tuple_desc = const_cast<TupleDescriptor*>(desc_tbl->get_tuple_descriptor(0));
379+
ASSERT_NE(tuple_desc, nullptr);
380+
381+
const auto make_field = [](const std::string& name, int32_t field_id,
382+
TPrimitiveType::type primitive_type, bool optional) {
383+
auto field = std::make_shared<schema::external::TField>();
384+
field->__set_name(name);
385+
field->__set_id(field_id);
386+
field->__set_is_optional(optional);
387+
TColumnType type;
388+
type.__set_type(primitive_type);
389+
field->__set_type(type);
390+
schema::external::TFieldPtr field_ptr;
391+
field_ptr.__set_field_ptr(std::move(field));
392+
return field_ptr;
393+
};
394+
schema::external::TStructField root;
395+
root.__set_fields({make_field("new_new_id", 1, TPrimitiveType::INT, false),
396+
make_field("new_name", 2, TPrimitiveType::STRING, true),
397+
make_field("data", 3, TPrimitiveType::STRING, false),
398+
make_field("id", 4, TPrimitiveType::INT, true)});
399+
schema::external::TSchema schema;
400+
schema.__set_schema_id(4);
401+
schema.__set_root_field(root);
402+
403+
TFileScanRangeParams scan_params;
404+
scan_params.__set_file_type(TFileType::FILE_LOCAL);
405+
scan_params.__set_format_type(TFileFormatType::FORMAT_PARQUET);
406+
scan_params.__set_num_of_columns_from_file(cast_set<int32_t>(columns.size()));
407+
scan_params.__set_current_schema_id(4);
408+
scan_params.__set_history_schema_info({schema});
409+
scan_params.__set_iceberg_scan_semantics_version(ICEBERG_SCAN_SEMANTICS_VERSION_2);
410+
for (size_t index = 0; index < columns.size(); ++index) {
411+
const auto* slot = tuple_desc->slots()[index];
412+
TFileScanSlotInfo slot_info;
413+
slot_info.__set_slot_id(slot->id());
414+
slot_info.__set_is_file_slot(true);
415+
scan_params.required_slots.push_back(slot_info);
416+
scan_params.default_value_of_src_slot.emplace(slot->id(), TExpr {});
417+
scan_params.column_idxs.push_back(cast_set<int32_t>(index + 1));
418+
scan_params.slot_name_to_schema_pos.emplace(slot->col_name(), cast_set<int32_t>(index + 1));
419+
}
420+
scan_params.__isset.required_slots = true;
421+
scan_params.__isset.default_value_of_src_slot = true;
422+
scan_params.__isset.column_idxs = true;
423+
scan_params.__isset.slot_name_to_schema_pos = true;
424+
425+
const std::string path =
426+
"./docker/thirdparties/docker-compose/iceberg/scripts/preinstalled_data/iceberg/"
427+
"equality_delete_par_1/data/"
428+
"00000-0-bd4d0a30-cdf6-48d7-933d-91e860870eb9-00001.parquet";
429+
io::FileReaderSPtr file_reader;
430+
ASSERT_TRUE(io::global_local_filesystem()->open_file(path, &file_reader).ok());
431+
TFileRangeDesc range;
432+
range.__set_path(path);
433+
range.__set_start_offset(0);
434+
range.__set_size(file_reader->size());
435+
range.__set_file_size(file_reader->size());
436+
range.__set_format_type(TFileFormatType::FORMAT_PARQUET);
437+
TTableFormatFileDesc table_format;
438+
table_format.__set_table_format_type("iceberg");
439+
table_format.__set_iceberg_params(TIcebergFileDesc {});
440+
range.__set_table_format_params(table_format);
441+
442+
RuntimeState runtime_state {TQueryOptions(), TQueryGlobals()};
443+
runtime_state.set_desc_tbl(desc_tbl);
444+
std::unordered_map<std::string, int> colname_to_slot_id;
445+
Block block;
446+
for (const auto* slot : tuple_desc->slots()) {
447+
colname_to_slot_id.emplace(slot->col_name(), slot->id());
448+
block.insert({slot->get_empty_mutable_column(), slot->type(), slot->col_name()});
449+
}
450+
RuntimeProfile profile("ExternalRowIDFetcher");
451+
auto scanner = FileScanner::create_unique(&runtime_state, &profile, &scan_params,
452+
&colname_to_slot_id, tuple_desc);
453+
ASSERT_TRUE(scanner->prepare_for_read_lines(range).ok());
454+
ExternalFileMappingInfo external_info(0, range, false);
455+
int64_t init_reader_ms = 0;
456+
int64_t get_block_ms = 0;
457+
const auto status = scanner->read_lines_from_range(range, {0}, &block, external_info,
458+
&init_reader_ms, &get_block_ms);
459+
ASSERT_TRUE(status.ok()) << status;
460+
ASSERT_EQ(block.rows(), 1);
461+
EXPECT_EQ(block.get_by_position(block.get_position_by_name("new_name"))
462+
.column->get_data_at(0)
463+
.to_string(),
464+
"bob");
465+
EXPECT_EQ(block.get_by_position(block.get_position_by_name("data"))
466+
.column->get_data_at(0)
467+
.to_string(),
468+
"e");
469+
EXPECT_TRUE(block.get_by_position(block.get_position_by_name("id")).column->is_null_at(0));
470+
}
471+
325472
} // namespace doris

‎be/test/format/transformer/vorc_transformer_test.cpp‎

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -631,7 +631,83 @@ TEST_F(VOrcTransformerTest, SkipsInvalidBinaryChildrenHiddenByNullableCollection
631631
block.insert({std::move(nullable_array), nullable_array_type, "uuid_array"});
632632
block.insert({std::move(nullable_map), nullable_map_type, "binary_map"});
633633
ASSERT_TRUE(transformer.write(block).ok());
634+
635+
auto make_visible_block = [&](const std::string& array_uuid, const std::string& map_uuid,
636+
const std::string& map_fixed) {
637+
auto visible_array_elements = ColumnString::create();
638+
visible_array_elements->insert_data(array_uuid.data(), array_uuid.size());
639+
auto visible_array_offsets = ColumnArray::ColumnOffsets::create();
640+
visible_array_offsets->get_data().push_back(1);
641+
auto visible_array = ColumnNullable::create(
642+
ColumnArray::create(ColumnNullable::create(std::move(visible_array_elements),
643+
ColumnUInt8::create(1, 0)),
644+
std::move(visible_array_offsets)),
645+
ColumnUInt8::create(1, 0));
646+
647+
auto visible_map_keys = ColumnString::create();
648+
visible_map_keys->insert_data(map_uuid.data(), map_uuid.size());
649+
auto visible_map_values = ColumnString::create();
650+
visible_map_values->insert_data(map_fixed.data(), map_fixed.size());
651+
auto visible_map_offsets = ColumnArray::ColumnOffsets::create();
652+
visible_map_offsets->get_data().push_back(1);
653+
auto visible_map = ColumnNullable::create(
654+
ColumnMap::create(std::move(visible_map_keys), std::move(visible_map_values),
655+
std::move(visible_map_offsets)),
656+
ColumnUInt8::create(1, 0));
657+
658+
Block visible_block;
659+
visible_block.insert({std::move(visible_array), nullable_array_type, "uuid_array"});
660+
visible_block.insert({std::move(visible_map), nullable_map_type, "binary_map"});
661+
return visible_block;
662+
};
663+
664+
const std::string valid_uuid = "00112233-4455-6677-8899-aabbccddeeff";
665+
Block invalid_uuid_block = make_visible_block("invalid-visible-uuid", valid_uuid, "ABCD");
666+
Status invalid_uuid = transformer.write(invalid_uuid_block);
667+
ASSERT_FALSE(invalid_uuid.ok());
668+
EXPECT_NE(invalid_uuid.to_string().find("Invalid UUID string length"), std::string::npos);
669+
670+
Block invalid_fixed_block = make_visible_block(valid_uuid, valid_uuid, "BAD");
671+
Status invalid_fixed = transformer.write(invalid_fixed_block);
672+
ASSERT_FALSE(invalid_fixed.ok());
673+
EXPECT_NE(invalid_fixed.to_string().find("FIXED[4]"), std::string::npos);
634674
ASSERT_TRUE(transformer.close().ok());
675+
676+
io::FileReaderSPtr file_reader;
677+
ASSERT_TRUE(_fs->open_file(_file_path, &file_reader).ok());
678+
auto input_stream = std::make_unique<ORCFileInputStream>(
679+
_file_path, file_reader, nullptr, nullptr, 8L * 1024L * 1024L, 1L * 1024L * 1024L);
680+
auto reader = orc::createReader(std::move(input_stream), orc::ReaderOptions());
681+
auto row_reader = reader->createRowReader();
682+
auto row_batch = row_reader->createRowBatch(2);
683+
ASSERT_TRUE(row_reader->next(*row_batch));
684+
const auto& root = assert_cast<const orc::StructVectorBatch&>(*row_batch);
685+
ASSERT_EQ(root.numElements, 2);
686+
const auto& array_batch = assert_cast<const orc::ListVectorBatch&>(*root.fields[0]);
687+
const auto& array_values = assert_cast<const orc::StringVectorBatch&>(*array_batch.elements);
688+
const auto& map_batch = assert_cast<const orc::MapVectorBatch&>(*root.fields[1]);
689+
const auto& map_keys_batch = assert_cast<const orc::StringVectorBatch&>(*map_batch.keys);
690+
const auto& map_values_batch = assert_cast<const orc::StringVectorBatch&>(*map_batch.elements);
691+
ASSERT_TRUE(array_batch.hasNulls);
692+
EXPECT_FALSE(array_batch.notNull[0]);
693+
EXPECT_TRUE(array_batch.notNull[1]);
694+
EXPECT_EQ(array_batch.offsets[0], 0);
695+
EXPECT_EQ(array_batch.offsets[1], 0);
696+
EXPECT_EQ(array_batch.offsets[2], 1);
697+
ASSERT_TRUE(map_batch.hasNulls);
698+
EXPECT_FALSE(map_batch.notNull[0]);
699+
EXPECT_TRUE(map_batch.notNull[1]);
700+
EXPECT_EQ(map_batch.offsets[0], 0);
701+
EXPECT_EQ(map_batch.offsets[1], 0);
702+
EXPECT_EQ(map_batch.offsets[2], 1);
703+
704+
const std::array<uint8_t, 16> expected_uuid = {0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77,
705+
0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff};
706+
ASSERT_EQ(array_values.length[0], expected_uuid.size());
707+
EXPECT_EQ(0, std::memcmp(array_values.data[0], expected_uuid.data(), expected_uuid.size()));
708+
ASSERT_EQ(map_keys_batch.length[0], expected_uuid.size());
709+
EXPECT_EQ(0, std::memcmp(map_keys_batch.data[0], expected_uuid.data(), expected_uuid.size()));
710+
EXPECT_EQ(std::string_view(map_values_batch.data[0], map_values_batch.length[0]), "ABCD");
635711
}
636712

637713
TEST_F(VOrcTransformerTest, DetectsOnlyFieldsThatNeedIcebergBinaryNormalization) {

‎be/test/format_v2/table/iceberg_reader_test.cpp‎

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4401,6 +4401,78 @@ TEST(IcebergV2ReaderTest, IcebergMissingWholeStructEqualityKeyMaterializesDefaul
44014401
}
44024402
}
44034403

4404+
TEST(IcebergV2ReaderTest, IcebergProjectedStructDoesNotReuseReaddedEqualityKeyByName) {
4405+
const auto run_case = [](FileFormat file_format) {
4406+
const bool is_parquet = file_format == FileFormat::PARQUET;
4407+
const std::string format_name = is_parquet ? "parquet" : "orc";
4408+
const auto test_dir = std::filesystem::temp_directory_path() /
4409+
("doris_v2_missing_reused_equality_key_" + format_name);
4410+
std::filesystem::remove_all(test_dir);
4411+
std::filesystem::create_directories(test_dir);
4412+
const auto file_path = (test_dir / ("split." + format_name)).string();
4413+
const auto delete_file_path = (test_dir / ("equality-delete." + format_name)).string();
4414+
if (is_parquet) {
4415+
write_nested_equality_parquet_file(file_path, {1, 2, 3}, {7, 8, 9},
4416+
{false, false, false}, true, "k", 4);
4417+
write_nested_equality_parquet_file(delete_file_path, {}, {7}, {false}, true, "k", 3);
4418+
} else {
4419+
write_nested_equality_orc_file(file_path, {1, 2, 3}, {7, 8, 9}, {false, false, false},
4420+
"k", 4);
4421+
write_nested_equality_orc_file(delete_file_path, {}, {7}, {false}, "k", 3);
4422+
}
4423+
4424+
auto payload = external_struct_schema_field(
4425+
"payload", 1,
4426+
{external_schema_field("k", 4, {}, std::nullopt,
4427+
external_primitive_type(TPrimitiveType::INT), false, true),
4428+
external_schema_field("k", 3, {}, std::nullopt,
4429+
external_primitive_type(TPrimitiveType::INT), false, true)},
4430+
true);
4431+
std::vector<schema::external::TSchema> history = {
4432+
external_schema(-1, {external_schema_field("id", 0), std::move(payload)})};
4433+
4434+
const auto int_type = std::make_shared<DataTypeInt32>();
4435+
std::vector<ColumnDefinition> projected_columns;
4436+
projected_columns.push_back(make_table_column(0, "id", int_type));
4437+
auto current_key = make_table_column(4, "k", int_type);
4438+
auto payload_type = std::make_shared<DataTypeStruct>(DataTypes {int_type}, Strings {"k"});
4439+
auto projected_payload = make_table_column(1, "payload", payload_type);
4440+
projected_payload.children = {std::move(current_key)};
4441+
projected_columns.push_back(std::move(projected_payload));
4442+
auto scan_params = make_local_scan_params(file_format);
4443+
scan_params.__set_iceberg_scan_semantics_version(ICEBERG_SCAN_SEMANTICS_VERSION_2);
4444+
scan_params.__set_current_schema_id(-1);
4445+
scan_params.__set_history_schema_info(std::move(history));
4446+
4447+
RuntimeProfile profile("test_profile");
4448+
RuntimeState state {TQueryOptions(), TQueryGlobals()};
4449+
io::FileReaderStats file_reader_stats;
4450+
io::FileCacheStatistics file_cache_stats;
4451+
auto io_ctx = make_io_context(&file_reader_stats, &file_cache_stats);
4452+
ShardedKVCache cache(1);
4453+
doris::format::iceberg::IcebergTableReader reader;
4454+
init_iceberg_reader(&reader, projected_columns, &scan_params, io_ctx, &state, &profile,
4455+
file_format);
4456+
4457+
auto split_options = build_split_options(file_path);
4458+
split_options.cache = &cache;
4459+
split_options.current_split_format = file_format;
4460+
const auto thrift_file_format =
4461+
is_parquet ? TFileFormatType::FORMAT_PARQUET : TFileFormatType::FORMAT_ORC;
4462+
split_options.current_range.__set_table_format_params(make_iceberg_table_format_desc(
4463+
file_path,
4464+
{make_iceberg_equality_delete_file(delete_file_path, {3}, thrift_file_format)}, 3));
4465+
ASSERT_TRUE(reader.prepare_split(split_options).ok());
4466+
EXPECT_EQ(read_iceberg_ids(&reader, projected_columns), std::vector<int32_t>({1, 2, 3}));
4467+
ASSERT_TRUE(reader.close().ok());
4468+
std::filesystem::remove_all(test_dir);
4469+
};
4470+
4471+
for (const auto file_format : {FileFormat::PARQUET, FileFormat::ORC}) {
4472+
run_case(file_format);
4473+
}
4474+
}
4475+
44044476
// A schema carrier may contain a dropped and a re-added child with the same name. Keep the
44054477
// Parquet/ORC setup identical so both readers prove that equality-key reconstruction follows the
44064478
// exact field-id path instead of attaching both same-name children to one synthetic struct slot.

‎fe/fe-connector/fe-connector-iceberg/src/test/java/org/apache/doris/connector/iceberg/IcebergConnectorMetadataTest.java‎

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
import org.junit.jupiter.api.Test;
4949

5050
import java.io.FileNotFoundException;
51+
import java.nio.ByteBuffer;
5152
import java.util.Arrays;
5253
import java.util.Collections;
5354
import java.util.HashMap;
@@ -56,6 +57,7 @@
5657
import java.util.Map;
5758
import java.util.Optional;
5859
import java.util.Set;
60+
import java.util.UUID;
5961

6062
/**
6163
* Characterization tests for {@link IcebergConnectorMetadata}, pinning the read-path behavior after
@@ -907,6 +909,39 @@ public void getTableSchemaDeclaresRequiredFieldsNotNull() {
907909
Assertions.assertTrue(name.isSourceNullable());
908910
}
909911

912+
@Test
913+
public void getTableSchemaLeavesIcebergDefaultsOutOfCatalogColumns() {
914+
// Initial defaults reach BE through the scan dictionary and write defaults are pinned per write, so the
915+
// cached catalog column carries neither: DESCRIBE and SHOW CREATE must not expose a possibly stale value.
916+
RecordingIcebergCatalogOps ops = new RecordingIcebergCatalogOps();
917+
Schema defaultsSchema = new Schema(
918+
Types.NestedField.optional("added_column").withId(1).ofType(Types.IntegerType.get())
919+
.withInitialDefault(7).withWriteDefault(9).build(),
920+
Types.NestedField.optional("added_timestamp").withId(2)
921+
.ofType(Types.TimestampType.withoutZone())
922+
.withInitialDefault(1_704_067_200_123_456L).build(),
923+
Types.NestedField.optional("added_timestamptz").withId(3)
924+
.ofType(Types.TimestampType.withZone())
925+
.withInitialDefault(1_704_067_200_123_456L).build(),
926+
Types.NestedField.optional("added_uuid").withId(4).ofType(Types.UUIDType.get())
927+
.withInitialDefault(UUID.fromString("00000000-0000-0000-0000-000000000000")).build(),
928+
Types.NestedField.optional("added_binary").withId(5).ofType(Types.BinaryType.get())
929+
.withInitialDefault(ByteBuffer.wrap(new byte[] {0, 1, 2, (byte) 0xFF})).build(),
930+
Types.NestedField.optional("added_fixed").withId(6).ofType(Types.FixedType.ofLength(4))
931+
.withInitialDefault(ByteBuffer.wrap(new byte[] {3, 2, 1, 0})).build());
932+
ops.table = new FakeIcebergTable(
933+
"t1", defaultsSchema, PartitionSpec.unpartitioned(),
934+
"s3://bucket/db1/t1", Collections.singletonMap("format-version", "3"));
935+
936+
List<ConnectorColumn> columns =
937+
metadataWith(ops).getTableSchema(null, new IcebergTableHandle("db1", "t1")).getColumns();
938+
939+
for (ConnectorColumn column : columns.subList(0, defaultsSchema.columns().size())) {
940+
Assertions.assertNull(column.getDefaultValue(), column.getName());
941+
Assertions.assertNull(column.getDefaultValueSql(), column.getName());
942+
}
943+
}
944+
910945
@Test
911946
public void getTableSchemaCopiesTablePropertiesAndLocation() {
912947
RecordingIcebergCatalogOps ops = new RecordingIcebergCatalogOps();

0 commit comments

Comments
 (0)