提交 dc75612b 编写于 作者: G Ganlin Zhao

fix CI

上级 f5223615
......@@ -117,6 +117,9 @@ int32_t exprTreeValidateExprNode(tExprNode *pExpr) {
return TSDB_CODE_TSC_INVALID_OPERATION;
}
if (IS_TIMESTAMP_TYPE(leftType) || IS_TIMESTAMP_TYPE(rightType)) {
if (pExpr->_node.pLeft->nodeType == TSQL_NODE_COL && pExpr->_node.pRight->nodeType == TSQL_NODE_COL) {
return TSDB_CODE_TSC_INVALID_OPERATION;
}
//timestamp cannot be used in arithmetic
//operation with other data types
if (!IS_TIMESTAMP_TYPE(leftType) || !IS_TIMESTAMP_TYPE(rightType) ||
......
......@@ -542,7 +542,7 @@ static FORCE_INLINE int32_t convertToInteger(tVariant *pVariant, int64_t *result
}
errno = 0;
if (IS_SIGNED_NUMERIC_TYPE(pVariant->nType) || (pVariant->nType == TSDB_DATA_TYPE_BOOL)) {
if (IS_SIGNED_NUMERIC_TYPE(pVariant->nType) || IS_TIMESTAMP_TYPE(pVariant->nType) || (pVariant->nType == TSDB_DATA_TYPE_BOOL)) {
*result = pVariant->i64;
} else if (IS_UNSIGNED_NUMERIC_TYPE(pVariant->nType)) {
*result = pVariant->u64;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册