fix select external table crash when using non-rich vector format
This commit is contained in:
parent
da8bd42f5e
commit
1599572972
@ -380,6 +380,19 @@ int ObStaticEngineCG::postorder_generate_op(ObLogicalOperator &op,
|
||||
}
|
||||
}
|
||||
|
||||
if (OB_SUCC(ret) && log_op_def::LOG_TABLE_SCAN == op.get_type()
|
||||
&& static_cast<ObLogTableScan *>(&op)->get_table_type() == share::schema::EXTERNAL_TABLE) {
|
||||
ObDASScanCtDef &scan_ctdef = static_cast<ObTableScanSpec*>(spec)->tsc_ctdef_.scan_ctdef_;
|
||||
ObExternalFileFormat::FormatType format_type = ObExternalFileFormat::INVALID_FORMAT;
|
||||
if (OB_FAIL(ObSQLUtils::get_external_table_type(scan_ctdef.external_file_format_str_.str_,
|
||||
format_type))) {
|
||||
LOG_WARN("fail to get external table format", K(ret));
|
||||
} else if (ObExternalFileFormat::CSV_FORMAT != format_type && !spec->use_rich_format_) {
|
||||
ret = OB_NOT_SUPPORTED;
|
||||
LOG_USER_ERROR(OB_NOT_SUPPORTED, "Using non-rich vector format in external tables");
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user