Skip to content

Commit b0344bd

Browse files
committed
fix(format): retain release array validation
1 parent 13bbb09 commit b0344bd

2 files changed

Lines changed: 2 additions & 6 deletions

File tree

src/paimon/format/orc/orc_adapter.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -940,10 +940,9 @@ Result<std::shared_ptr<arrow::Array>> OrcAdapter::AppendBatch(
940940
MakeArrowBuilder(type, batch, pool));
941941
std::shared_ptr<arrow::Array> array;
942942
PAIMON_RETURN_NOT_OK_FROM_ARROW(builder->Finish(&array));
943-
#ifndef NDEBUG
944-
// Keep structural validation in debug builds without adding its recursive cost to reads.
943+
// Keep this check in release builds so malformed nested arrays return a Status before they
944+
// reach Arrow constructors that enforce their invariants with a process-terminating check.
945945
PAIMON_RETURN_NOT_OK_FROM_ARROW(array->Validate());
946-
#endif
947946
return array;
948947
}
949948

src/paimon/format/parquet/parquet_file_batch_reader.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -616,10 +616,7 @@ Result<BatchReader::ReadBatch> ParquetFileBatchReader::NextBatch() {
616616
}
617617
PAIMON_ASSIGN_OR_RAISE_FROM_ARROW(std::shared_ptr<arrow::Array> array,
618618
batch->ToStructArray());
619-
#ifndef NDEBUG
620-
// Keep structural validation in debug builds without adding its recursive cost to reads.
621619
PAIMON_RETURN_NOT_OK_FROM_ARROW(array->Validate());
622-
#endif
623620
PAIMON_ASSIGN_OR_RAISE(bool need_cast, ParquetTimestampConverter::NeedCastArrayForTimestamp(
624621
array->type(), read_data_type_));
625622
if (need_cast) {

0 commit comments

Comments
 (0)