From 9ff76cbda711203fda84cca33dd75df4edd0489f Mon Sep 17 00:00:00 2001 From: hzcheng Date: Tue, 28 Apr 2020 10:30:11 +0800 Subject: [PATCH] TD-166 --- src/common/inc/tdataformat.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/inc/tdataformat.h b/src/common/inc/tdataformat.h index 7347782b89..3e73cc937b 100644 --- a/src/common/inc/tdataformat.h +++ b/src/common/inc/tdataformat.h @@ -104,7 +104,7 @@ static FORCE_INLINE void *tdGetRowDataOfCol(SDataRow row, int8_t type, int32_t o return dataRowAt(row, *(int32_t *)dataRowAt(row, offset)); break; default: - return row + offset; + return dataRowAt(row, offset); break; } } @@ -127,11 +127,11 @@ static FORCE_INLINE void *tdGetColDataOfRow(SDataCol *pCol, int row) { { case TSDB_DATA_TYPE_BINARY: case TSDB_DATA_TYPE_NCHAR: - return pCol->pData + ((int32_t *)(pCol->pData))[row]; + return (void *)((char *)(pCol->pData) + ((int32_t *)(pCol->pData))[row]); break; default: - return pCol->pData + TYPE_BYTES[pCol->type] * row; + return (void *)((char *)(pCol->pData) + TYPE_BYTES[pCol->type] * row); break; } } -- GitLab