25 namespace foreign_storage {
36 const std::vector<MLModelMetadata>& ml_models_metadata,
37 std::map<std::string, import_export::TypedImportBuffer*>& import_buffers) {
38 for (
const auto& ml_model_metadata : ml_models_metadata) {
39 if (
auto itr = import_buffers.find(
"model_name"); itr != import_buffers.end()) {
40 itr->second->addString(ml_model_metadata.getModelName());
42 if (
auto itr = import_buffers.find(
"model_type"); itr != import_buffers.end()) {
43 itr->second->addString(ml_model_metadata.getModelTypeStr());
45 if (
auto itr = import_buffers.find(
"predicted"); itr != import_buffers.end()) {
46 itr->second->addString(ml_model_metadata.getPredicted());
48 if (
auto itr = import_buffers.find(
"features"); itr != import_buffers.end()) {
49 itr->second->addStringArray(ml_model_metadata.getFeatures());
51 if (
auto itr = import_buffers.find(
"training_query"); itr != import_buffers.end()) {
52 itr->second->addString(ml_model_metadata.getTrainingQuery());
54 if (
auto itr = import_buffers.find(
"num_logical_features");
55 itr != import_buffers.end()) {
56 itr->second->addBigint(ml_model_metadata.getNumLogicalFeatures());
58 if (
auto itr = import_buffers.find(
"num_physical_features");
59 itr != import_buffers.end()) {
60 itr->second->addBigint(ml_model_metadata.getNumFeatures());
62 if (
auto itr = import_buffers.find(
"num_categorical_features");
63 itr != import_buffers.end()) {
64 itr->second->addBigint(ml_model_metadata.getNumCategoricalFeatures());
66 if (
auto itr = import_buffers.find(
"num_numeric_features");
67 itr != import_buffers.end()) {
68 itr->second->addBigint(ml_model_metadata.getNumLogicalFeatures() -
69 ml_model_metadata.getNumCategoricalFeatures());
71 if (
auto itr = import_buffers.find(
"train_fraction"); itr != import_buffers.end()) {
72 itr->second->addDouble(ml_model_metadata.getDataSplitTrainFraction());
74 if (
auto itr = import_buffers.find(
"eval_fraction"); itr != import_buffers.end()) {
75 itr->second->addDouble(ml_model_metadata.getDataSplitEvalFraction());
83 const std::string& table_name) {
92 const std::string& table_name,
93 std::map<std::string, import_export::TypedImportBuffer*>& import_buffers) {
std::vector< MLModelMetadata > getModelMetadata() const
This file contains the class specification and related data structures for SysCatalog.
const ForeignTable * foreign_table_
static constexpr const char * ML_MODEL_METADATA_SYS_TABLE_NAME