mirror of
https://github.com/apache/arrow.git
synced 2026-10-29 00:56:31 +08:00
Throw exception when encountering bad Thrift metadata in RecordReader
Change-Id: Id47d6d915700bfa564c647be85864e739db58815
This commit is contained in:
1 parent
cd543b9756
commit
59400a2f14
1 file changed
+6
-2
@@ -850,8 +850,12 @@ std::shared_ptr<RecordReader> RecordReader::Make(const ColumnDescriptor* descr,
|
||||
case Type::FIXED_LEN_BYTE_ARRAY:
|
||||
return std::shared_ptr<RecordReader>(
|
||||
new RecordReader(new TypedRecordReader<FLBAType>(descr, pool)));
|
||||
default:
|
||||
DCHECK(false);
|
||||
default: {
|
||||
// PARQUET-1481: This can occur if the file is corrupt
|
||||
std::stringstream ss;
|
||||
ss << "Invalid physical column type: " << static_cast<int>(descr->physical_type());
|
||||
throw ParquetException(ss.str());
|
||||
}
|
||||
}
|
||||
// Unreachable code, but supress compiler warning
|
||||
return nullptr;
|
||||
|
||||
Reference in new issue
Block a user