fix orc type check for null orc file
@@ -97,6 +97,7 @@ void ORCFormatReader::startNewSplit() {
if (batch == nullptr) {
batch = orcReader->createRowBatch(this->nTuplesPerBatch);
// do type check
+ if (batch) {
const dbcommon::TupleDesc *td = opts.getTupleDesc();
orc::StructVectorBatch *structBatch =
dynamic_cast<orc::StructVectorBatch *>(batch.get());
@@ -110,6 +111,7 @@ void ORCFormatReader::startNewSplit() {
}
}
}
+}
void ORCFormatReader::typeCheck(dbcommon::TypeKind colType,
const std::string &colName,
