MCPcopy Create free account
hub / github.com/apache/impala / VerifyMinimalResponse

Function VerifyMinimalResponse

be/src/exec/catalog-op-executor.cc:80–98  ·  view source on GitHub ↗

Used in LocalCatalog mode to verify the catalog RPC reponse only contains minimal catalog objects, i.e. database objects have only db names and table objects have only db and table names.

Source from the content-addressed store, hash-verified

78/// catalog objects, i.e. database objects have only db names and table objects have only
79/// db and table names.
80static void VerifyMinimalResponse(const TCatalogUpdateResult& result) {
81 for (const TCatalogObject& obj : result.updated_catalog_objects) {
82 if (obj.type == impala::TCatalogObjectType::TABLE) {
83 // Make sure the table object only contains db_name and tbl_name and nothing else.
84 DCHECK(!obj.table.__isset.metastore_table);
85 DCHECK(!obj.table.__isset.columns);
86 DCHECK(!obj.table.__isset.clustering_columns);
87 DCHECK(!obj.table.__isset.table_stats);
88 DCHECK(!obj.table.__isset.hdfs_table);
89 DCHECK(!obj.table.__isset.kudu_table);
90 DCHECK(!obj.table.__isset.hbase_table);
91 DCHECK(!obj.table.__isset.iceberg_table);
92 DCHECK(!obj.table.__isset.data_source_table);
93 } else if (obj.type == impala::TCatalogObjectType::DATABASE) {
94 DCHECK(!obj.db.__isset.metastore_db)
95 << "Minimal database TCatalogObject should have empty metastore_db";
96 }
97 }
98}
99
100Status CatalogOpExecutor::Exec(const TCatalogOpRequest& request) {
101 Status status;

Callers 1

ExecMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected