Merge branch 'feat/TS-4243-3.0' of https://github.com/taosdata/TDengine into feat/ly-TS-4243-3.0

This commit is contained in:
54liuyao 2024-04-01 18:35:44 +08:00
commit 2e11f3674d
2 changed files with 7 additions and 6 deletions

View File

@ -1238,7 +1238,8 @@ int32_t tValueCompare(const SValue *tv1, const SValue *tv2) {
T_COMPARE_SCALAR_VALUE(uint64_t, &tv1->val, &tv2->val); T_COMPARE_SCALAR_VALUE(uint64_t, &tv1->val, &tv2->val);
case TSDB_DATA_TYPE_GEOMETRY: case TSDB_DATA_TYPE_GEOMETRY:
case TSDB_DATA_TYPE_BINARY: { case TSDB_DATA_TYPE_BINARY: {
return strcmp((const char *)tv1->pData, (const char *)tv2->pData); int32_t ret = strncmp((const char *)tv1->pData, (const char *)tv2->pData, TMIN(tv1->nData, tv2->nData));
return ret ? ret : (tv1->nData < tv2->nData ? -1 : (tv1->nData > tv2->nData ? 1 : 0));
} }
case TSDB_DATA_TYPE_NCHAR: { case TSDB_DATA_TYPE_NCHAR: {
int32_t ret = tasoUcs4Compare((TdUcs4 *)tv1->pData, (TdUcs4 *)tv2->pData, int32_t ret = tasoUcs4Compare((TdUcs4 *)tv1->pData, (TdUcs4 *)tv2->pData,

View File

@ -387,14 +387,14 @@ SSDataBlock* doProjectOperation(SOperatorInfo* pOperator) {
pOperator->cost.openCost = (taosGetTimestampUs() - st) / 1000.0; pOperator->cost.openCost = (taosGetTimestampUs() - st) / 1000.0;
} }
if (pTaskInfo->execModel == OPTR_EXEC_MODEL_STREAM) {
printDataBlock(p, getStreamOpName(pOperator->operatorType), GET_TASKID(pTaskInfo));
}
if (pProjectInfo->outputIgnoreGroup) { if (pProjectInfo->outputIgnoreGroup) {
p->info.id.groupId = 0; p->info.id.groupId = 0;
} }
if (pTaskInfo->execModel == OPTR_EXEC_MODEL_STREAM) {
printDataBlock(p, getStreamOpName(pOperator->operatorType), GET_TASKID(pTaskInfo));
}
return (p->info.rows > 0) ? p : NULL; return (p->info.rows > 0) ? p : NULL;
} }