Skip to content

Commit ce05e8c

Browse files
committed
remove table validation checks
Remove validation checks on table. The validation checks mainly fail for debug builds and what they do is to actually validate the metadata for a table. While dealing with indices for dictionaries, it looks like for compatibility, we accept signed or unsigned uint32 or uint64 integers. However, arrow dictionary builder AppendIndices only accepts signed integers. So, we end up appending signed integers while dictionary schema could still be unsigned integers. So, when the validation happens, it checks if the dictionary schema and the actual column data are the same types. Since it's possible to have uint64 schema with int64 columns, this leads to errors like (and similar error for uint32): ``` Column data for field 0 with type dictionary<values=string, indices=int64, ordered=0> is inconsistent with schema dictionary<values=string, indices=uint64, ordered=0> ```
1 parent 214fd3c commit ce05e8c

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

cpp/src/arrow/table.cc

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,6 @@ TableBatchReader::TableBatchReader(const Table& table)
619619
for (int i = 0; i < table.num_columns(); ++i) {
620620
column_data_[i] = table.column(i).get();
621621
}
622-
DCHECK(table_.Validate().ok());
623622
}
624623

625624
TableBatchReader::TableBatchReader(std::shared_ptr<Table> table)
@@ -633,7 +632,6 @@ TableBatchReader::TableBatchReader(std::shared_ptr<Table> table)
633632
for (int i = 0; i < owned_table_->num_columns(); ++i) {
634633
column_data_[i] = owned_table_->column(i).get();
635634
}
636-
DCHECK(table_.Validate().ok());
637635
}
638636

639637
std::shared_ptr<Schema> TableBatchReader::schema() const { return table_.schema(); }

0 commit comments

Comments
 (0)