提交 6b2461ce 编写于 作者: S shenglian zhou

rename functions

上级 a296c352
......@@ -1874,7 +1874,7 @@ static int32_t handleAggregateExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_
return TSDB_CODE_SUCCESS;
}
static int32_t handleArithmeticExpr(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t exprIndex, tSqlExprItem* pItem) {
static int32_t handleSQLExprItem(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, int32_t exprIndex, tSqlExprItem* pItem) {
const char* msg1 = "invalid column name, illegal column type, or columns in arithmetic expression from two tables";
SColumnList columnList = {0};
......@@ -2074,7 +2074,7 @@ int32_t validateSelectNodeList(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SArray* pS
int32_t type = pItem->pNode->type;
if (type == SQL_NODE_EXPR) {
int32_t code = handleArithmeticExpr(pCmd, pQueryInfo, i, pItem);
int32_t code = handleSQLExprItem(pCmd, pQueryInfo, i, pItem);
if (code != TSDB_CODE_SUCCESS) {
return code;
}
......@@ -2103,7 +2103,7 @@ int32_t validateSelectNodeList(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, SArray* pS
}
if (willProcessFunctionWithExpr(pItem)) {
int32_t code = handleArithmeticExpr(pCmd, pQueryInfo, i, pItem);
int32_t code = handleSQLExprItem(pCmd, pQueryInfo, i, pItem);
if (code != TSDB_CODE_SUCCESS) {
return code;
}
......@@ -4331,7 +4331,7 @@ static int32_t getJoinCondInfo(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, tSqlExpr*
return checkAndSetJoinCondInfo(pCmd, pQueryInfo, pExpr);
}
static int32_t validateArithmeticSQLFunc(SSqlCmd* pCmd, tSqlExpr* pExpr,
static int32_t validateSQLExprSQLFunc(SSqlCmd* pCmd, tSqlExpr* pExpr,
SQueryInfo* pQueryInfo, SColumnList* pList, int32_t* type, uint64_t *uid) {
int32_t code = TSDB_CODE_SUCCESS;
int32_t functionId = isValidFunction(pExpr->Expr.operand.z, pExpr->Expr.operand.n);
......@@ -4468,7 +4468,7 @@ static int32_t validateSQLExprItem(SSqlCmd* pCmd, tSqlExpr* pExpr,
*uid = uidLeft;
} else if (pExpr->type == SQL_NODE_SQLFUNCTION) {
int32_t ret = validateArithmeticSQLFunc(pCmd, pExpr, pQueryInfo, pList, type, uid);
int32_t ret = validateSQLExprSQLFunc(pCmd, pExpr, pQueryInfo, pList, type, uid);
if (ret != TSDB_CODE_SUCCESS) {
return ret;
}
......
......@@ -414,9 +414,9 @@ _arithmetic_operator_fn_t getArithmeticOperatorFn(int32_t arithmeticOptr) {
void vectorPow(tExprOperandInfo* pInputs, uint8_t numInputs, tExprOperandInfo* pOutput, int32_t order) {
assert(numInputs == 2);
assert(pInputs[1].numOfRows == 1 || pInputs[0].numOfRows == 1 || pInputs[0].numOfRows == pInputs[1].numOfRows );
int numOfRows = (pInputs[0].numOfRows > pInputs[1].numOfRows) ? pInputs[0].numOfRows : pInputs[1].numOfRows;
if (pInputs[1].numOfRows == 1) {
assert(pInputs[1].numOfRows == 1 && pInputs[0].numOfRows >= 1);
int numOfRows = pInputs[0].numOfRows;
double base = 0;
GET_TYPED_DATA(base, double, pInputs[1].type, pInputs[1].data);
......@@ -432,16 +432,13 @@ void vectorPow(tExprOperandInfo* pInputs, uint8_t numInputs, tExprOperandInfo* p
SET_TYPED_DATA(pOutputData, pOutput->type, result);
}
}
} else {
assert(0);
}
}
void vectorLog(tExprOperandInfo* pInputs, uint8_t numInputs, tExprOperandInfo* pOutput, int32_t order) {
assert(numInputs == 2);
assert(pInputs[1].numOfRows == 1 || pInputs[0].numOfRows == 1 || pInputs[0].numOfRows == pInputs[1].numOfRows );
int numOfRows = (pInputs[0].numOfRows > pInputs[1].numOfRows) ? pInputs[0].numOfRows : pInputs[1].numOfRows;
if (pInputs[1].numOfRows == 1) {
assert(pInputs[1].numOfRows == 1 && pInputs[0].numOfRows >= 1);
int numOfRows = pInputs[0].numOfRows;
double base = 0;
GET_TYPED_DATA(base, double, pInputs[1].type, pInputs[1].data);
......@@ -457,9 +454,6 @@ void vectorLog(tExprOperandInfo* pInputs, uint8_t numInputs, tExprOperandInfo* p
SET_TYPED_DATA(pOutputData, pOutput->type, result);
}
}
} else {
assert(0);
}
}
......
Subproject commit 9ae793ad2d567eb11d10627b65698f612542e988
Subproject commit edad746514b2a53a8cf6061c93b98b52a5388692
Subproject commit ba539ce69dc4fe53536e9b0517fe75917dce5c46
Subproject commit f56aa0f485d7bb6aebbcefc2007eeecdccb767c8
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册