MCPcopy Create free account
hub / github.com/baidu/tera / ParseTableSchemaFile

Function ParseTableSchemaFile

src/sdk/sdk_utils.cc:952–962  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

950}
951
952bool ParseTableSchemaFile(const string& file, TableDescriptor* table_desc, ErrorCode* err) {
953 PropTree schema_tree;
954 if (!schema_tree.ParseFromFile(file)) {
955 LOG(ERROR) << schema_tree.State();
956 LOG(ERROR) << file;
957 return false;
958 }
959
960 VLOG(10) << "table to create: " << schema_tree.FormatString();
961 return FillTableDescriptor(schema_tree, table_desc) && CheckTableDescrptor(*table_desc, err);
962}
963
964bool BuildSchema(TableDescriptor* table_desc, string* schema) {
965 // build schema string from table descriptor

Callers 3

CreateByFileOpFunction · 0.85
CreateTablesMethod · 0.85
LoadDescriptorMethod · 0.85

Calls 5

FillTableDescriptorFunction · 0.85
CheckTableDescrptorFunction · 0.85
ParseFromFileMethod · 0.80
FormatStringMethod · 0.80
StateMethod · 0.45

Tested by 1

LoadDescriptorMethod · 0.68