opti:modify logic for telnet and json in schemaless

This commit is contained in:
wangmm0220 2022-12-08 23:06:07 +08:00
parent ef6e9f481f
commit 5d6494d5ae
3 changed files with 898 additions and 683 deletions

File diff suppressed because it is too large Load Diff

View File

@ -301,7 +301,9 @@ int32_t smlBindData(SQuery* query, bool dataFormat, SArray* tags, SArray* colsSc
SSchema* pColSchema = &pSchema[pTableCxt->boundColsInfo.pColIndex[c]]; SSchema* pColSchema = &pSchema[pTableCxt->boundColsInfo.pColIndex[c]];
SColVal* pVal = taosArrayGet(pTableCxt->pValues, pTableCxt->boundColsInfo.pColIndex[c]); SColVal* pVal = taosArrayGet(pTableCxt->pValues, pTableCxt->boundColsInfo.pColIndex[c]);
void** p = taosHashGet(rowData, pColSchema->name, strlen(pColSchema->name)); void** p = taosHashGet(rowData, pColSchema->name, strlen(pColSchema->name));
ASSERT(p != NULL); if (p == NULL) {
continue;
}
SSmlKv *kv = *(SSmlKv **)p; SSmlKv *kv = *(SSmlKv **)p;
if (pColSchema->type == TSDB_DATA_TYPE_TIMESTAMP) { if (pColSchema->type == TSDB_DATA_TYPE_TIMESTAMP) {
@ -365,7 +367,7 @@ SQuery* smlInitHandle() {
qDestroyQuery(pQuery); qDestroyQuery(pQuery);
return NULL; return NULL;
} }
stmt->pTableBlockHashObj = taosHashInit(128, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), true, HASH_NO_LOCK); stmt->pTableBlockHashObj = taosHashInit(16, taosGetDefaultHashFunction(TSDB_DATA_TYPE_BIGINT), true, HASH_NO_LOCK);
stmt->freeHashFunc = insDestroyTableDataCxtHashMap; stmt->freeHashFunc = insDestroyTableDataCxtHashMap;
stmt->freeArrayFunc = insDestroyVgroupDataCxtList; stmt->freeArrayFunc = insDestroyVgroupDataCxtList;

View File

@ -1091,9 +1091,10 @@ int sml_ts2164_Test() {
taos_free_result(pRes); taos_free_result(pRes);
const char *sql[] = { const char *sql[] = {
// "meters,location=la,groupid=ca current=11.8,voltage=221,phase=0.27",
"meters,location=la,groupid=ca current=11.8,voltage=221",
"meters,location=la,groupid=ca current=11.8,voltage=221,phase=0.27", "meters,location=la,groupid=ca current=11.8,voltage=221,phase=0.27",
"meters,location=la,groupid=ca current=11.8,voltage=221,phase=0.27", // "meters,location=la,groupid=cb current=11.8,voltage=221,phase=0.27",
"meters,location=la,groupid=cb current=11.8,voltage=221,phase=0.27",
}; };
pRes = taos_query(taos, "use line_test"); pRes = taos_query(taos, "use line_test");
@ -1150,8 +1151,8 @@ int sml_ttl_Test() {
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {
int ret = 0; int ret = 0;
ret = sml_ttl_Test(); // ret = sml_ttl_Test();
ASSERT(!ret); // ASSERT(!ret);
ret = sml_ts2164_Test(); ret = sml_ts2164_Test();
ASSERT(!ret); ASSERT(!ret);
ret = smlProcess_influx_Test(); ret = smlProcess_influx_Test();