diff --git a/src/inc/ttype.h b/src/inc/ttype.h index 32638ebb9dd16d8a3eb7f4f8248028e19d724bdd..3a70a970e3d9869a4fe1802c8a70892df26a5720 100644 --- a/src/inc/ttype.h +++ b/src/inc/ttype.h @@ -67,41 +67,41 @@ typedef struct tstr { } \ } while (0) -#define SET_TYPED_DATA(_v, _type, _data) \ - do { \ - switch (_type) { \ - case TSDB_DATA_TYPE_BOOL: \ - case TSDB_DATA_TYPE_TINYINT: \ - *(int8_t *)(_v) = (_data); \ - break; \ - case TSDB_DATA_TYPE_UTINYINT: \ - *(uint8_t *)(_v) = (_data); \ - break; \ - case TSDB_DATA_TYPE_SMALLINT: \ - *(int16_t *)(_v) = (_data); \ - break; \ - case TSDB_DATA_TYPE_USMALLINT: \ - *(uint16_t *)(_v) = (_data); \ - break; \ - case TSDB_DATA_TYPE_BIGINT: \ - *(int64_t *)(_v) = (_data); \ - break; \ - case TSDB_DATA_TYPE_UBIGINT: \ - *(uint64_t *)(_v) = (_data); \ - break; \ - case TSDB_DATA_TYPE_FLOAT: \ - *(float *)(_v) = (_data); \ - break; \ - case TSDB_DATA_TYPE_DOUBLE: \ - *(double *)(_v) = (_data); \ - break; \ - case TSDB_DATA_TYPE_UINT: \ - *(uint32_t *)(_v) = (_data); \ - break; \ - default: \ - *(int32_t *)(_v) = (_data); \ - break; \ - } \ +#define SET_TYPED_DATA(_v, _type, _data) \ + do { \ + switch (_type) { \ + case TSDB_DATA_TYPE_BOOL: \ + case TSDB_DATA_TYPE_TINYINT: \ + *(int8_t *)(_v) = (int8_t)(_data); \ + break; \ + case TSDB_DATA_TYPE_UTINYINT: \ + *(uint8_t *)(_v) = (uint8_t)(_data); \ + break; \ + case TSDB_DATA_TYPE_SMALLINT: \ + *(int16_t *)(_v) = (int16_t)(_data); \ + break; \ + case TSDB_DATA_TYPE_USMALLINT: \ + *(uint16_t *)(_v) = (uint16_t)(_data); \ + break; \ + case TSDB_DATA_TYPE_BIGINT: \ + *(int64_t *)(_v) = (int64_t)(_data); \ + break; \ + case TSDB_DATA_TYPE_UBIGINT: \ + *(uint64_t *)(_v) = (uint64_t)(_data); \ + break; \ + case TSDB_DATA_TYPE_FLOAT: \ + *(float *)(_v) = (float)(_data); \ + break; \ + case TSDB_DATA_TYPE_DOUBLE: \ + *(double *)(_v) = (double)(_data); \ + break; \ + case TSDB_DATA_TYPE_UINT: \ + *(uint32_t *)(_v) = (uint32_t)(_data); \ + break; \ + default: \ + *(int32_t *)(_v) = (_data); \ + break; \ + } \ } while (0) #define IS_SIGNED_NUMERIC_TYPE(_t) ((_t) >= TSDB_DATA_TYPE_TINYINT && (_t) <= TSDB_DATA_TYPE_BIGINT) diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 77eb4e1cc74db6d53378bc4a6e79b5cbd91f70f0..33e13d77ccd24cc156a2a88c072a2b9be02513b5 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -5805,18 +5805,7 @@ static void tableIntervalProcess(SQInfo *pQInfo, STableQueryInfo* pTableInfo) { } } - // TODO opt performance -// if (isPointInterpoQuery(pQuery)) { -// SArray *prev = tsdbGetExternalRow(pRuntimeEnv->pQueryHandle, &pQInfo->memRef, TSDB_PREV_ROW); -// -// for(int32_t i = 0; i < pQuery->numOfCols; ++i) { -// SColumnInfoData *p = taosArrayGet(prev, i); -// memcpy(pRuntimeEnv->prevRow[i], p->pData, p->info.bytes); -// } -// } - scanOneTableDataBlocks(pRuntimeEnv, newStartKey); - finalizeQueryResult(pRuntimeEnv); // skip offset result rows