Skip to content

Commit 1592d34

Browse files
authored
[Improve][C++] Enhance the validation of writer with arrow::Table's Validate (#410)
Signed-off-by: acezen <qiaozi.zwb@alibaba-inc.com>
1 parent 706f0b5 commit 1592d34

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

cpp/src/arrow_chunk_writer.cc

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,9 @@ Status VertexPropertyWriter::validate(
171171
}
172172
// strong validate for the input_table
173173
if (validate_level == ValidateLevel::strong_validate) {
174+
// validate the input table
175+
RETURN_NOT_ARROW_OK(input_table->Validate());
176+
// validate the schema
174177
auto schema = input_table->schema();
175178
for (auto& property : property_group->GetProperties()) {
176179
int indice = schema->GetFieldIndex(property.name);
@@ -447,6 +450,9 @@ Status EdgeChunkWriter::validate(
447450
}
448451
// strong validate for the input_table
449452
if (validate_level == ValidateLevel::strong_validate) {
453+
// validate the input table
454+
RETURN_NOT_ARROW_OK(input_table->Validate());
455+
// validate the schema
450456
auto schema = input_table->schema();
451457
int index = schema->GetFieldIndex(GeneralParams::kOffsetCol);
452458
if (index == -1) {
@@ -538,6 +544,9 @@ Status EdgeChunkWriter::validate(
538544
}
539545
// strong validate for the input table
540546
if (validate_level == ValidateLevel::strong_validate) {
547+
// validate the input table
548+
RETURN_NOT_ARROW_OK(input_table->Validate());
549+
// validate the schema
541550
auto schema = input_table->schema();
542551
for (auto& property : property_group->GetProperties()) {
543552
int indice = schema->GetFieldIndex(property.name);

0 commit comments

Comments
 (0)