feat: the query uses the 'cachelast' option to decide whether to optimize the last_row function

This commit is contained in:
Xiaoyu Wang 2022-07-15 09:07:19 +08:00
parent 9522288f6b
commit 979b20189d
2 changed files with 6 additions and 0 deletions

View File

@ -1773,6 +1773,10 @@ static int32_t setTableIndex(STranslateContext* pCxt, SName* pName, SRealTableNo
}
static int32_t setTableCacheLastMode(STranslateContext* pCxt, SName* pName, SRealTableNode* pRealTable) {
if (TSDB_SYSTEM_TABLE == pRealTable->pMeta->tableType) {
return TSDB_CODE_SUCCESS;
}
SDbCfgInfo dbCfg = {0};
int32_t code = getDBCfg(pCxt, pRealTable->table.dbName, &dbCfg);
if (TSDB_CODE_SUCCESS == code) {

View File

@ -234,6 +234,8 @@ void generateDnodes(MockCatalogService* mcs) {
}
void generateDatabases(MockCatalogService* mcs) {
mcs->createDatabase(TSDB_INFORMATION_SCHEMA_DB);
mcs->createDatabase(TSDB_PERFORMANCE_SCHEMA_DB);
mcs->createDatabase("test");
mcs->createDatabase("rollup_db", true);
}