diff --git a/src/client/src/tscSQLParser.c b/src/client/src/tscSQLParser.c index 549dc7be52c517faee3a7c462ae9e1cb02910a03..08217d987ba8570c27829d6bd773b78053031e52 100644 --- a/src/client/src/tscSQLParser.c +++ b/src/client/src/tscSQLParser.c @@ -4373,12 +4373,10 @@ static int32_t validateSQLExprItemSQLFunc(SSqlCmd* pCmd, tSqlExpr* pExpr, } { if (TSDB_FUNC_IS_SCALAR(functionId)) { - bool allChildValue = true; bool anyChildScalar = false; bool anyChildAgg = false; for (int i = 0; i < numChildren; ++i) { assert (childrenTypes[i] != SQLEXPR_TYPE_UNASSIGNED); - allChildValue = allChildValue && (childrenTypes[i] == SQLEXPR_TYPE_VALUE); anyChildScalar = anyChildScalar || (childrenTypes[i] == SQLEXPR_TYPE_SCALAR); anyChildAgg = anyChildAgg || (childrenTypes[i] == SQLEXPR_TYPE_AGG); } @@ -4387,8 +4385,6 @@ static int32_t validateSQLExprItemSQLFunc(SSqlCmd* pCmd, tSqlExpr* pExpr, } if (anyChildAgg) { *type = SQLEXPR_TYPE_AGG; - } else if (allChildValue) { - *type = SQLEXPR_TYPE_VALUE; } else { *type = SQLEXPR_TYPE_SCALAR; } @@ -7386,7 +7382,8 @@ static bool onlyTagPrjFunction(SQueryInfo* pQueryInfo) { size_t size = taosArrayGetSize(pQueryInfo->exprList); for (int32_t i = 0; i < size; ++i) { SExprInfo* pExpr = tscExprGet(pQueryInfo, i); - if (pExpr->base.functionId == TSDB_FUNC_PRJ) { + if (pExpr->base.functionId == TSDB_FUNC_PRJ || + (pExpr->base.functionId == TSDB_FUNC_SCALAR_EXPR && ((pQueryInfo->type & TSDB_QUERY_TYPE_PROJECTION_QUERY) != 0))) { hasColumnPrj = true; } else if (pExpr->base.functionId == TSDB_FUNC_TAGPRJ) { hasTagPrj = true; @@ -7478,8 +7475,6 @@ static int32_t checkUpdateTagPrjFunctions(SQueryInfo* pQueryInfo, char* msg) { if ((aAggs[functionId].status & TSDB_FUNCSTATE_SELECTIVITY) != 0) { numOfSelectivity++; - } else if ((aAggs[functionId].status & TSDB_FUNCSTATE_SCALAR) != 0) { - numOfScalar++; } else { numOfAggregation++; } @@ -7721,7 +7716,8 @@ int32_t doFunctionsCompatibleCheck(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, char* continue; } - if (TSDB_FUNC_IS_SCALAR(f)) { + if (f == TSDB_FUNC_SCALAR_EXPR && + (pQueryInfo->type & TSDB_QUERY_TYPE_PROJECTION_QUERY) != 0) { return invalidOperationMsg(msg, msg1); } @@ -7745,9 +7741,6 @@ int32_t doFunctionsCompatibleCheck(SSqlCmd* pCmd, SQueryInfo* pQueryInfo, char* return invalidOperationMsg(msg, msg1); } - if (IS_SCALAR_FUNCTION(aAggs[f].status)) { - return invalidOperationMsg(msg, msg1); - } if (f == TSDB_FUNC_COUNT && pExpr->base.colInfo.colIndex == TSDB_TBNAME_COLUMN_INDEX) { return invalidOperationMsg(msg, msg1); @@ -9826,7 +9819,7 @@ int32_t exprTreeFromSqlExpr(SSqlCmd* pCmd, tExprNode **pExpr, const tSqlExpr* pS SArray* paramList = pSqlExpr->Expr.paramList; size_t paramSize = paramList ? taosArrayGetSize(paramList) : 0; if (paramSize > 0) { - (*pExpr)->_func.numChildren = (uint8_t)paramSize; + (*pExpr)->_func.numChildren = (int32_t)paramSize; (*pExpr)->_func.pChildren = (tExprNode**)calloc(paramSize, sizeof(tExprNode*)); } for (int32_t i = 0; i < paramSize; ++i) { diff --git a/src/common/inc/texpr.h b/src/common/inc/texpr.h index a669286f2288b6bac8be2a7dbc8b581962e37e13..311f65073367e2b2a2c5e436b4655cf12ef4c02a 100644 --- a/src/common/inc/texpr.h +++ b/src/common/inc/texpr.h @@ -62,8 +62,10 @@ struct SSchema; #define TSDB_FUNC_SCALAR_ROUND (TSDB_FUNC_FLAG_SCALAR | 0x000C) #define TSDB_FUNC_SCALAR_CONCAT (TSDB_FUNC_FLAG_SCALAR | 0x000D) #define TSDB_FUNC_SCALAR_LENGTH (TSDB_FUNC_FLAG_SCALAR | 0x000E) -#define TSDB_FUNC_SCALAR_CAST (TSDB_FUNC_FLAG_SCALAR | 0x000F) -#define TSDB_FUNC_SCALAR_MAX_NUM 16 +#define TSDB_FUNC_SCALAR_CONCAT_WS (TSDB_FUNC_FLAG_SCALAR | 0x000F) +#define TSDB_FUNC_SCALAR_CHAR_LENGTH (TSDB_FUNC_FLAG_SCALAR | 0x0010) +#define TSDB_FUNC_SCALAR_CAST (TSDB_FUNC_FLAG_SCALAR | 0x0011) +#define TSDB_FUNC_SCALAR_MAX_NUM 18 #define TSDB_FUNC_SCALAR_NAME_MAX_LEN 16 @@ -74,7 +76,7 @@ typedef struct { char* data; } tExprOperandInfo; -typedef void (*_expr_scalar_function_t)(int16_t functionId, tExprOperandInfo* pInputs, uint8_t numInputs, tExprOperandInfo* pOutput, int32_t order); +typedef void (*_expr_scalar_function_t)(int16_t functionId, tExprOperandInfo* pInputs, int32_t numInputs, tExprOperandInfo* pOutput, int32_t order); _expr_scalar_function_t getExprScalarFunction(uint16_t scalar); @@ -128,7 +130,7 @@ typedef struct tExprNode { struct { int16_t functionId; - uint8_t numChildren; + int32_t numChildren; struct tExprNode **pChildren; } _func; diff --git a/src/common/src/texpr.c b/src/common/src/texpr.c index 257e350bc45f3d2f1724b0b6943af96945edeafb..bac2eb4cdf2f6b19c11d63e423ef0ceb8b3a6074 100644 --- a/src/common/src/texpr.c +++ b/src/common/src/texpr.c @@ -30,6 +30,7 @@ static int32_t exprValidateMathNode(tExprNode *pExpr); static int32_t exprValidateStringConcatNode(tExprNode *pExpr); +static int32_t exprValidateStringConcatWsNode(tExprNode *pExpr); static int32_t exprValidateStringLengthNode(tExprNode *pExpr); static int32_t exprValidateCastNode(char* msgbuf, tExprNode *pExpr); @@ -65,12 +66,17 @@ int32_t exprTreeValidateFunctionNode(char* msgbuf, tExprNode *pExpr) { case TSDB_FUNC_SCALAR_CONCAT: { return exprValidateStringConcatNode(pExpr); } - case TSDB_FUNC_SCALAR_LENGTH: { + case TSDB_FUNC_SCALAR_LENGTH: + case TSDB_FUNC_SCALAR_CHAR_LENGTH: { return exprValidateStringLengthNode(pExpr); } case TSDB_FUNC_SCALAR_CAST: { return exprValidateCastNode(msgbuf, pExpr); } + case TSDB_FUNC_SCALAR_CONCAT_WS: { + return exprValidateStringConcatWsNode(pExpr); + } + default: break; } @@ -348,7 +354,7 @@ void exprTreeInternalNodeTraverse(tExprNode *pExpr, int32_t numOfRows, tExprOper void exprTreeFunctionNodeTraverse(tExprNode *pExpr, int32_t numOfRows, tExprOperandInfo *output, void *param, int32_t order, char *(*getSourceDataBlock)(void *, const char*, int32_t)) { - uint8_t numChildren = pExpr->_func.numChildren; + int32_t numChildren = pExpr->_func.numChildren; if (numChildren == 0) { _expr_scalar_function_t scalarFn = getExprScalarFunction(pExpr->_func.functionId); output->type = pExpr->resultType; @@ -517,7 +523,7 @@ static void exprTreeToBinaryImpl(SBufferWriter* bw, tExprNode* expr) { exprTreeToBinaryImpl(bw, expr->_node.pRight); } else if (expr->nodeType == TSQL_NODE_FUNC) { tbufWriteInt16(bw, expr->_func.functionId); - tbufWriteUint8(bw, expr->_func.numChildren); + tbufWriteInt32(bw, expr->_func.numChildren); for (int i = 0; i < expr->_func.numChildren; ++i) { exprTreeToBinaryImpl(bw, expr->_func.pChildren[i]); } @@ -590,7 +596,7 @@ static tExprNode* exprTreeFromBinaryImpl(SBufferReader* br) { assert(pExpr->_node.pLeft != NULL && pExpr->_node.pRight != NULL); } else if (pExpr->nodeType == TSQL_NODE_FUNC) { pExpr->_func.functionId = tbufReadInt16(br); - pExpr->_func.numChildren = tbufReadUint8(br); + pExpr->_func.numChildren = tbufReadInt32(br); pExpr->_func.pChildren = (tExprNode**)calloc(pExpr->_func.numChildren, sizeof(tExprNode*)); for (int i = 0; i < pExpr->_func.numChildren; ++i) { pExpr->_func.pChildren[i] = exprTreeFromBinaryImpl(br); @@ -865,7 +871,7 @@ tExprNode* exprdup(tExprNode* pNode) { //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // scalar functions int32_t exprValidateStringConcatNode(tExprNode *pExpr) { - if (pExpr->_func.numChildren < 2) { + if (pExpr->_func.numChildren < 2 || pExpr->_func.numChildren > 8) { return TSDB_CODE_TSC_INVALID_OPERATION; } @@ -936,6 +942,82 @@ int32_t exprValidateStringConcatNode(tExprNode *pExpr) { return TSDB_CODE_SUCCESS; } +int32_t exprValidateStringConcatWsNode(tExprNode *pExpr) { + if (pExpr->_func.numChildren < 3 || pExpr->_func.numChildren > 9) { + return TSDB_CODE_TSC_INVALID_OPERATION; + } + + int16_t prevResultType = TSDB_DATA_TYPE_NULL; + int16_t resultType = TSDB_DATA_TYPE_NULL; + bool resultTypeDeduced = false; + for (int32_t i = 0; i < pExpr->_func.numChildren; ++i) { + tExprNode *child = pExpr->_func.pChildren[i]; + if (child->nodeType != TSQL_NODE_VALUE) { + resultType = child->resultType; + if (!IS_VAR_DATA_TYPE(resultType)) { + return TSDB_CODE_TSC_INVALID_OPERATION; + } + if (!resultTypeDeduced) { + resultTypeDeduced = true; + } else { + if (resultType != prevResultType) { + return TSDB_CODE_TSC_INVALID_OPERATION; + } + } + prevResultType = child->resultType; + } else { + if (!IS_VAR_DATA_TYPE(child->resultType)) { + return TSDB_CODE_TSC_INVALID_OPERATION; + } + } + } + + if (resultTypeDeduced) { + for (int32_t i = 0; i < pExpr->_func.numChildren; ++i) { + tExprNode *child = pExpr->_func.pChildren[i]; + if (child->nodeType == TSQL_NODE_VALUE) { + if (!IS_VAR_DATA_TYPE(child->pVal->nType)) { + return TSDB_CODE_TSC_INVALID_OPERATION; + } + char* payload = malloc(child->pVal->nLen * TSDB_NCHAR_SIZE + VARSTR_HEADER_SIZE); + tVariantDump(child->pVal, payload, resultType, true); + int16_t resultBytes = varDataTLen(payload); + free(payload); + child->resultType = resultType; + child->resultBytes = (int16_t)(resultBytes); + } + } + } else { + for (int32_t i = 0; i < pExpr->_func.numChildren; ++i) { + tExprNode *child = pExpr->_func.pChildren[i]; + assert(child->nodeType == TSQL_NODE_VALUE) ; + resultType = child->resultType; + for (int j = i+1; j < pExpr->_func.numChildren; ++j) { + if (pExpr->_func.pChildren[j]->resultType != resultType) { + return TSDB_CODE_TSC_INVALID_OPERATION; + } + } + } + } + + pExpr->resultType = resultType; + int16_t resultBytes = 0; + for (int32_t i = 1; i < pExpr->_func.numChildren; ++i) { + tExprNode *child = pExpr->_func.pChildren[i]; + if (resultBytes <= resultBytes + child->resultBytes - VARSTR_HEADER_SIZE) { + resultBytes += child->resultBytes - VARSTR_HEADER_SIZE; + } else { + return TSDB_CODE_TSC_INVALID_OPERATION; + } + } + tExprNode* wsNode = pExpr->_func.pChildren[0]; + int16_t wsResultBytes = wsNode->resultBytes - VARSTR_HEADER_SIZE; + resultBytes += wsResultBytes * (pExpr->_func.numChildren - 2); + pExpr->resultBytes = resultBytes + VARSTR_HEADER_SIZE; + return TSDB_CODE_SUCCESS; +} + + int32_t exprValidateStringLengthNode(tExprNode *pExpr) { if (pExpr->_func.numChildren != 1) { return TSDB_CODE_TSC_INVALID_OPERATION; @@ -1073,7 +1155,7 @@ int32_t exprValidateMathNode(tExprNode *pExpr) { return TSDB_CODE_SUCCESS; } -void vectorConcat(int16_t functionId, tExprOperandInfo* pInputs, uint8_t numInputs, tExprOperandInfo* pOutput, int32_t order) { +void vectorConcat(int16_t functionId, tExprOperandInfo* pInputs, int32_t numInputs, tExprOperandInfo* pOutput, int32_t order) { assert(functionId == TSDB_FUNC_SCALAR_CONCAT && numInputs >=2 && order == TSDB_ORDER_ASC); for (int i = 0; i < numInputs; ++i) { assert(pInputs[i].numOfRows == 1 || pInputs[i].numOfRows == pOutput->numOfRows); @@ -1113,8 +1195,52 @@ void vectorConcat(int16_t functionId, tExprOperandInfo* pInputs, uint8_t numInpu free(inputData); } -void vectorLength(int16_t functionId, tExprOperandInfo *pInputs, uint8_t numInputs, tExprOperandInfo* pOutput, int32_t order) { +void vectorConcatWs(int16_t functionId, tExprOperandInfo* pInputs, int32_t numInputs, tExprOperandInfo* pOutput, int32_t order) { + assert(functionId == TSDB_FUNC_SCALAR_CONCAT_WS && numInputs >=3 && order == TSDB_ORDER_ASC); + for (int i = 0; i < numInputs; ++i) { + assert(pInputs[i].numOfRows == 1 || pInputs[i].numOfRows == pOutput->numOfRows); + } + + char* outputData = NULL; + char** inputData = calloc(numInputs, sizeof(char*)); + for (int i = 0; i < pOutput->numOfRows; ++i) { + for (int j = 0; j < numInputs; ++j) { + if (pInputs[j].numOfRows == 1) { + inputData[j] = pInputs[j].data; + } else { + inputData[j] = pInputs[j].data + i * pInputs[j].bytes; + } + } + + outputData = pOutput->data + i * pOutput->bytes; + + if (isNull(inputData[0], pInputs[0].type)) { + setNull(outputData, pOutput->type, pOutput->bytes); + continue; + } + + int16_t dataLen = 0; + for (int j = 1; j < numInputs; ++j) { + if (isNull(inputData[j], pInputs[j].type)) { + continue; + } + memcpy(((char*)varDataVal(outputData))+dataLen, varDataVal(inputData[j]), varDataLen(inputData[j])); + dataLen += varDataLen(inputData[j]); + if (j < numInputs - 1) { + memcpy(((char*)varDataVal(outputData))+dataLen, varDataVal(inputData[0]), varDataLen(inputData[0])); + dataLen += varDataLen(inputData[0]); + } + } + varDataSetLen(outputData, dataLen); + } + + + free(inputData); +} + +void vectorLength(int16_t functionId, tExprOperandInfo *pInputs, int32_t numInputs, tExprOperandInfo* pOutput, int32_t order) { assert(functionId == TSDB_FUNC_SCALAR_LENGTH && numInputs == 1 && order == TSDB_ORDER_ASC); + assert(IS_VAR_DATA_TYPE(pInputs[0].type)); char* data0 = NULL; char* outputData = NULL; @@ -1232,8 +1358,34 @@ void castConvert(int16_t inputType, int16_t inputBytes, char *input, int16_t Out } } -void vectorMathFunc(int16_t functionId, tExprOperandInfo *pInputs, uint8_t numInputs, tExprOperandInfo* pOutput, int32_t order) { +void vectorCharLength(int16_t functionId, tExprOperandInfo *pInputs, int32_t numInputs, tExprOperandInfo* pOutput, int32_t order) { + assert(functionId == TSDB_FUNC_SCALAR_CHAR_LENGTH && numInputs == 1 && order == TSDB_ORDER_ASC); + assert(IS_VAR_DATA_TYPE(pInputs[0].type)); + char* data0 = NULL; + char* outputData = NULL; + for (int32_t i = 0; i < pOutput->numOfRows; ++i) { + if (pInputs[0].numOfRows == 1) { + data0 = pInputs[0].data; + } else { + data0 = pInputs[0].data + i * pInputs[0].bytes; + } + + outputData = pOutput->data + i * pOutput->bytes; + if (isNull(data0, pInputs[0].type)) { + setNull(outputData, pOutput->type, pOutput->bytes); + } else { + int16_t result = varDataLen(data0); + if (pInputs[0].type == TSDB_DATA_TYPE_BINARY) { + SET_TYPED_DATA(outputData, pOutput->type, result); + } else if (pInputs[0].type == TSDB_DATA_TYPE_NCHAR) { + SET_TYPED_DATA(outputData, pOutput->type, result/TSDB_NCHAR_SIZE); + } + } + } +} + +void vectorMathFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numInputs, tExprOperandInfo* pOutput, int32_t order) { for (int i = 0; i < numInputs; ++i) { assert(pInputs[i].numOfRows == 1 || pInputs[i].numOfRows == pOutput->numOfRows); } @@ -1538,4 +1690,14 @@ tScalarFunctionInfo aScalarFunctions[] = { "cast", vectorMathFunc }, + { + TSDB_FUNC_SCALAR_CONCAT_WS, + "concat_ws", + vectorConcatWs + }, + { + TSDB_FUNC_SCALAR_CHAR_LENGTH, + "char_length", + vectorCharLength + } }; diff --git a/src/inc/ttokendef.h b/src/inc/ttokendef.h index 507bde06080c2008b5c89d0036fe8429e8daf766..d97bc943a9ade49f629dfce8e0b71860ab5905a6 100644 --- a/src/inc/ttokendef.h +++ b/src/inc/ttokendef.h @@ -220,6 +220,8 @@ + + #define TK_SPACE 300 #define TK_COMMENT 301 #define TK_ILLEGAL 302 diff --git a/src/query/inc/qAggMain.h b/src/query/inc/qAggMain.h index 76892ad1b03ae8108fc80beddb3bb06ea8fb93e4..217efffe2b539c7d1ad56704c9572ff1eb8227ff 100644 --- a/src/query/inc/qAggMain.h +++ b/src/query/inc/qAggMain.h @@ -90,7 +90,6 @@ extern "C" { #define TSDB_FUNCSTATE_OF 0x10u // outer forward #define TSDB_FUNCSTATE_NEED_TS 0x20u // timestamp is required during query processing #define TSDB_FUNCSTATE_SELECTIVITY 0x40u // selectivity functions, can exists along with tag columns -#define TSDB_FUNCSTATE_SCALAR 0x80u #define TSDB_BASE_FUNC_SO TSDB_FUNCSTATE_SO | TSDB_FUNCSTATE_STREAM | TSDB_FUNCSTATE_STABLE | TSDB_FUNCSTATE_OF #define TSDB_BASE_FUNC_MO TSDB_FUNCSTATE_MO | TSDB_FUNCSTATE_STREAM | TSDB_FUNCSTATE_STABLE | TSDB_FUNCSTATE_OF @@ -231,7 +230,6 @@ int32_t isValidFunction(const char* name, int32_t len); #define IS_MULTIOUTPUT(x) (((x)&TSDB_FUNCSTATE_MO) != 0) #define IS_SINGLEOUTPUT(x) (((x)&TSDB_FUNCSTATE_SO) != 0) #define IS_OUTER_FORWARD(x) (((x)&TSDB_FUNCSTATE_OF) != 0) -#define IS_SCALAR_FUNCTION(x) (((x)&TSDB_FUNCSTATE_SCALAR) != 0) // determine the real data need to calculated the result enum { diff --git a/src/query/src/qExecutor.c b/src/query/src/qExecutor.c index 2d4920d0f8fb1b53b7bf5dd218c66f07f86ae532..75cab67f38a72e47475ff40810d17e6d241e5360 100644 --- a/src/query/src/qExecutor.c +++ b/src/query/src/qExecutor.c @@ -435,10 +435,6 @@ static bool isScalarWithTagsQuery(SQLFunctionCtx *pCtx, int32_t numOfOutput) { hasTags = true; continue; } - - if ((aAggs[functId].status & TSDB_FUNCSTATE_SCALAR) != 0) { - numOfScalar++; - } } return (numOfScalar > 0 && hasTags); @@ -1866,7 +1862,7 @@ static int32_t setCtxTagColumnInfo(SQLFunctionCtx *pCtx, int32_t numOfOutput) { if (functionId == TSDB_FUNC_TAG_DUMMY || functionId == TSDB_FUNC_TS_DUMMY) { tagLen += pCtx[i].outputBytes; pTagCtx[num++] = &pCtx[i]; - } else if ((aAggs[functionId].status & TSDB_FUNCSTATE_SELECTIVITY) != 0 || (aAggs[functionId].status & TSDB_FUNCSTATE_SCALAR) != 0) { + } else if ((aAggs[functionId].status & TSDB_FUNCSTATE_SELECTIVITY) != 0) { p = &pCtx[i]; } else if (functionId == TSDB_FUNC_TS || functionId == TSDB_FUNC_TAG) { // tag function may be the group by tag column diff --git a/src/query/src/qPercentile.c b/src/query/src/qPercentile.c index 9945b79e329b168b620650426dcc08eca33221cc..8428c339f4e89d6a5e988448f3aadadf522102b1 100644 --- a/src/query/src/qPercentile.c +++ b/src/query/src/qPercentile.c @@ -146,7 +146,7 @@ int32_t tBucketIntHash(tMemBucket *pBucket, const void *value) { } int32_t tBucketUintHash(tMemBucket *pBucket, const void *value) { - int64_t v = 0; + uint64_t v = 0; GET_TYPED_DATA(v, uint64_t, pBucket->type, value); int32_t index = -1; @@ -162,8 +162,8 @@ int32_t tBucketUintHash(tMemBucket *pBucket, const void *value) { index = (int32_t) (delta % pBucket->numOfSlots); } else { double slotSpan = (double)span / pBucket->numOfSlots; - index = (int32_t)((v - pBucket->range.u64MinVal) / slotSpan); - if (v == pBucket->range.u64MaxVal) { + index = (int32_t)(((double)v - pBucket->range.u64MinVal) / slotSpan); + if (index == pBucket->numOfSlots) { index -= 1; } } @@ -194,7 +194,7 @@ int32_t tBucketDoubleHash(tMemBucket *pBucket, const void *value) { } else { double slotSpan = span / pBucket->numOfSlots; index = (int32_t)((v - pBucket->range.dMinVal) / slotSpan); - if (v == pBucket->range.dMaxVal) { + if (index == pBucket->numOfSlots) { index -= 1; } } diff --git a/tests/pytest/functions/function_ceil.py b/tests/pytest/functions/function_ceil.py index 7d1ad4c0af9e25176c25cf132497c4fbb84738ae..cb3408c3774c09c41b637c0ddff2600e56d8aea9 100644 --- a/tests/pytest/functions/function_ceil.py +++ b/tests/pytest/functions/function_ceil.py @@ -1401,517 +1401,527 @@ class TDTestCase: self.randomUTinyint())) shouldPass = ['select ceil(int_col) from super', - 'select ceil(int_col) from t1', - 'select ceil(bigint_col) from super', - 'select ceil(bigint_col) from t1', - 'select ceil(float_col) from super', - 'select ceil(float_col) from t1', - 'select ceil(double_col) from super', - 'select ceil(double_col) from t1', - 'select ceil(smallint_col) from super', - 'select ceil(smallint_col) from t1', - 'select ceil(tinyint_col) from super', - 'select ceil(tinyint_col) from t1', - 'select ceil(uint_col) from super', - 'select ceil(uint_col) from t1', - 'select ceil(ubigint_col) from super', - 'select ceil(ubigint_col) from t1', - 'select ceil(usmallint_col) from super', - 'select ceil(usmallint_col) from t1', - 'select ceil(utinyint_col) from super', - 'select ceil(utinyint_col) from t1', - 'select ceil(int_col) - ceil(int_col) from super', - 'select ceil(int_col) - ceil(int_col) from t1', - 'select ceil(bigint_col) - ceil(bigint_col) from super', - 'select ceil(bigint_col) - ceil(bigint_col) from t1', - 'select ceil(float_col) - ceil(float_col) from super', - 'select ceil(float_col) - ceil(float_col) from t1', - 'select ceil(double_col) - ceil(double_col) from super', - 'select ceil(double_col) - ceil(double_col) from t1', - 'select ceil(smallint_col) - ceil(smallint_col) from super', - 'select ceil(smallint_col) - ceil(smallint_col) from t1', - 'select ceil(tinyint_col) - ceil(tinyint_col) from super', - 'select ceil(tinyint_col) - ceil(tinyint_col) from t1', - 'select ceil(uint_col) - ceil(uint_col) from super', - 'select ceil(uint_col) - ceil(uint_col) from t1', - 'select ceil(ubigint_col) - ceil(ubigint_col) from super', - 'select ceil(ubigint_col) - ceil(ubigint_col) from t1', - 'select ceil(usmallint_col) - ceil(usmallint_col) from super', - 'select ceil(usmallint_col) - ceil(usmallint_col) from t1', - 'select ceil(utinyint_col) - ceil(utinyint_col) from super', - 'select ceil(utinyint_col) - ceil(utinyint_col) from t1', - 'select ceil(int_col) / ceil(int_col) from super', - 'select ceil(int_col) / ceil(int_col) from t1', - 'select ceil(bigint_col) / ceil(bigint_col) from super', - 'select ceil(bigint_col) / ceil(bigint_col) from t1', - 'select ceil(float_col) / ceil(float_col) from super', - 'select ceil(float_col) / ceil(float_col) from t1', - 'select ceil(double_col) / ceil(double_col) from super', - 'select ceil(double_col) / ceil(double_col) from t1', - 'select ceil(smallint_col) / ceil(smallint_col) from super', - 'select ceil(smallint_col) / ceil(smallint_col) from t1', - 'select ceil(tinyint_col) / ceil(tinyint_col) from super', - 'select ceil(tinyint_col) / ceil(tinyint_col) from t1', - 'select ceil(uint_col) / ceil(uint_col) from super', - 'select ceil(uint_col) / ceil(uint_col) from t1', - 'select ceil(ubigint_col) / ceil(ubigint_col) from super', - 'select ceil(ubigint_col) / ceil(ubigint_col) from t1', - 'select ceil(usmallint_col) / ceil(usmallint_col) from super', - 'select ceil(usmallint_col) / ceil(usmallint_col) from t1', - 'select ceil(utinyint_col) / ceil(utinyint_col) from super', - 'select ceil(utinyint_col) / ceil(utinyint_col) from t1', - 'select ceil(int_col) * ceil(int_col) from super', - 'select ceil(int_col) * ceil(int_col) from t1', - 'select ceil(bigint_col) * ceil(bigint_col) from super', - 'select ceil(bigint_col) * ceil(bigint_col) from t1', - 'select ceil(float_col) * ceil(float_col) from super', - 'select ceil(float_col) * ceil(float_col) from t1', - 'select ceil(double_col) * ceil(double_col) from super', - 'select ceil(double_col) * ceil(double_col) from t1', - 'select ceil(smallint_col) * ceil(smallint_col) from super', - 'select ceil(smallint_col) * ceil(smallint_col) from t1', - 'select ceil(tinyint_col) * ceil(tinyint_col) from super', - 'select ceil(tinyint_col) * ceil(tinyint_col) from t1', - 'select ceil(uint_col) * ceil(uint_col) from super', - 'select ceil(uint_col) * ceil(uint_col) from t1', - 'select ceil(ubigint_col) * ceil(ubigint_col) from super', - 'select ceil(ubigint_col) * ceil(ubigint_col) from t1', - 'select ceil(usmallint_col) * ceil(usmallint_col) from super', - 'select ceil(usmallint_col) * ceil(usmallint_col) from t1', - 'select ceil(utinyint_col) * ceil(utinyint_col) from super', - 'select ceil(utinyint_col) * ceil(utinyint_col) from t1', - 'select ceil(count(ts)) from super', - 'select ceil(count(ts)) from t1', - 'select ceil(count(timestamp_col)) from super', - 'select ceil(count(timestamp_col)) from t1', - 'select ceil(count(int_col)) from super', - 'select ceil(count(int_col)) from t1', - 'select ceil(count(bigint_col)) from super', - 'select ceil(count(bigint_col)) from t1', - 'select ceil(count(float_col)) from super', - 'select ceil(count(float_col)) from t1', - 'select ceil(count(double_col)) from super', - 'select ceil(count(double_col)) from t1', - 'select ceil(count(binary_col)) from super', - 'select ceil(count(binary_col)) from t1', - 'select ceil(count(smallint_col)) from super', - 'select ceil(count(smallint_col)) from t1', - 'select ceil(count(tinyint_col)) from super', - 'select ceil(count(tinyint_col)) from t1', - 'select ceil(count(bool_col)) from super', - 'select ceil(count(bool_col)) from t1', - 'select ceil(count(nchar_col)) from super', - 'select ceil(count(nchar_col)) from t1', - 'select ceil(count(uint_col)) from super', - 'select ceil(count(uint_col)) from t1', - 'select ceil(count(ubigint_col)) from super', - 'select ceil(count(ubigint_col)) from t1', - 'select ceil(count(usmallint_col)) from super', - 'select ceil(count(usmallint_col)) from t1', - 'select ceil(count(utinyint_col)) from super', - 'select ceil(count(utinyint_col)) from t1', - 'select ceil(count(timestamp_tag)) from super', - 'select ceil(count(timestamp_tag)) from t1', - 'select ceil(count(int_tag)) from super', - 'select ceil(count(int_tag)) from t1', - 'select ceil(count(bigint_tag)) from super', - 'select ceil(count(bigint_tag)) from t1', - 'select ceil(count(float_tag)) from super', - 'select ceil(count(float_tag)) from t1', - 'select ceil(count(double_tag)) from super', - 'select ceil(count(double_tag)) from t1', - 'select ceil(count(binary_tag)) from super', - 'select ceil(count(binary_tag)) from t1', - 'select ceil(count(smallint_tag)) from super', - 'select ceil(count(smallint_tag)) from t1', - 'select ceil(count(tinyint_tag)) from super', - 'select ceil(count(tinyint_tag)) from t1', - 'select ceil(count(bool_tag)) from super', - 'select ceil(count(bool_tag)) from t1', - 'select ceil(count(nchar_tag)) from super', - 'select ceil(count(nchar_tag)) from t1', - 'select ceil(count(uint_tag)) from super', - 'select ceil(count(uint_tag)) from t1', - 'select ceil(count(ubigint_tag)) from super', - 'select ceil(count(ubigint_tag)) from t1', - 'select ceil(count(usmallint_tag)) from super', - 'select ceil(count(usmallint_tag)) from t1', - 'select ceil(count(utinyint_tag)) from super', - 'select ceil(count(utinyint_tag)) from t1', - 'select ceil(avg(int_col)) from super', - 'select ceil(avg(int_col)) from t1', - 'select ceil(avg(bigint_col)) from super', - 'select ceil(avg(bigint_col)) from t1', - 'select ceil(avg(float_col)) from super', - 'select ceil(avg(float_col)) from t1', - 'select ceil(avg(double_col)) from super', - 'select ceil(avg(double_col)) from t1', - 'select ceil(avg(smallint_col)) from super', - 'select ceil(avg(smallint_col)) from t1', - 'select ceil(avg(tinyint_col)) from super', - 'select ceil(avg(tinyint_col)) from t1', - 'select ceil(avg(uint_col)) from super', - 'select ceil(avg(uint_col)) from t1', - 'select ceil(avg(ubigint_col)) from super', - 'select ceil(avg(ubigint_col)) from t1', - 'select ceil(avg(usmallint_col)) from super', - 'select ceil(avg(usmallint_col)) from t1', - 'select ceil(avg(utinyint_col)) from super', - 'select ceil(avg(utinyint_col)) from t1', - 'select ceil(twa(int_col)) from t1', - 'select ceil(twa(bigint_col)) from t1', - 'select ceil(twa(float_col)) from t1', - 'select ceil(twa(double_col)) from t1', - 'select ceil(twa(smallint_col)) from t1', - 'select ceil(twa(tinyint_col)) from t1', - 'select ceil(twa(uint_col)) from t1', - 'select ceil(twa(ubigint_col)) from t1', - 'select ceil(twa(usmallint_col)) from t1', - 'select ceil(twa(utinyint_col)) from t1', - 'select ceil(sum(int_col)) from super', - 'select ceil(sum(int_col)) from t1', - 'select ceil(sum(bigint_col)) from super', - 'select ceil(sum(bigint_col)) from t1', - 'select ceil(sum(float_col)) from super', - 'select ceil(sum(float_col)) from t1', - 'select ceil(sum(double_col)) from super', - 'select ceil(sum(double_col)) from t1', - 'select ceil(sum(smallint_col)) from super', - 'select ceil(sum(smallint_col)) from t1', - 'select ceil(sum(tinyint_col)) from super', - 'select ceil(sum(tinyint_col)) from t1', - 'select ceil(sum(uint_col)) from super', - 'select ceil(sum(uint_col)) from t1', - 'select ceil(sum(ubigint_col)) from super', - 'select ceil(sum(ubigint_col)) from t1', - 'select ceil(sum(usmallint_col)) from super', - 'select ceil(sum(usmallint_col)) from t1', - 'select ceil(sum(utinyint_col)) from super', - 'select ceil(sum(utinyint_col)) from t1', - 'select ceil(stddev(int_col)) from super', - 'select ceil(stddev(int_col)) from t1', - 'select ceil(stddev(bigint_col)) from super', - 'select ceil(stddev(bigint_col)) from t1', - 'select ceil(stddev(float_col)) from super', - 'select ceil(stddev(float_col)) from t1', - 'select ceil(stddev(double_col)) from super', - 'select ceil(stddev(double_col)) from t1', - 'select ceil(stddev(smallint_col)) from super', - 'select ceil(stddev(smallint_col)) from t1', - 'select ceil(stddev(tinyint_col)) from super', - 'select ceil(stddev(tinyint_col)) from t1', - 'select ceil(stddev(uint_col)) from super', - 'select ceil(stddev(uint_col)) from t1', - 'select ceil(stddev(ubigint_col)) from super', - 'select ceil(stddev(ubigint_col)) from t1', - 'select ceil(stddev(usmallint_col)) from super', - 'select ceil(stddev(usmallint_col)) from t1', - 'select ceil(stddev(utinyint_col)) from super', - 'select ceil(stddev(utinyint_col)) from t1', - 'select ceil(irate(int_col)) from t1', - 'select ceil(irate(bigint_col)) from t1', - 'select ceil(irate(float_col)) from t1', - 'select ceil(irate(double_col)) from t1', - 'select ceil(irate(smallint_col)) from t1', - 'select ceil(irate(tinyint_col)) from t1', - 'select ceil(irate(uint_col)) from t1', - 'select ceil(irate(ubigint_col)) from t1', - 'select ceil(irate(usmallint_col)) from t1', - 'select ceil(irate(utinyint_col)) from t1', - 'select ceil(min(int_col)) from super', - 'select ceil(min(int_col)) from t1', - 'select ceil(min(bigint_col)) from super', - 'select ceil(min(bigint_col)) from t1', - 'select ceil(min(float_col)) from super', - 'select ceil(min(float_col)) from t1', - 'select ceil(min(double_col)) from super', - 'select ceil(min(double_col)) from t1', - 'select ceil(min(smallint_col)) from super', - 'select ceil(min(smallint_col)) from t1', - 'select ceil(min(tinyint_col)) from super', - 'select ceil(min(tinyint_col)) from t1', - 'select ceil(min(uint_col)) from super', - 'select ceil(min(uint_col)) from t1', - 'select ceil(min(ubigint_col)) from super', - 'select ceil(min(ubigint_col)) from t1', - 'select ceil(min(usmallint_col)) from super', - 'select ceil(min(usmallint_col)) from t1', - 'select ceil(min(utinyint_col)) from super', - 'select ceil(min(utinyint_col)) from t1', - 'select ceil(max(int_col)) from super', - 'select ceil(max(int_col)) from t1', - 'select ceil(max(bigint_col)) from super', - 'select ceil(max(bigint_col)) from t1', - 'select ceil(max(float_col)) from super', - 'select ceil(max(float_col)) from t1', - 'select ceil(max(double_col)) from super', - 'select ceil(max(double_col)) from t1', - 'select ceil(max(smallint_col)) from super', - 'select ceil(max(smallint_col)) from t1', - 'select ceil(max(tinyint_col)) from super', - 'select ceil(max(tinyint_col)) from t1', - 'select ceil(max(uint_col)) from super', - 'select ceil(max(uint_col)) from t1', - 'select ceil(max(ubigint_col)) from super', - 'select ceil(max(ubigint_col)) from t1', - 'select ceil(max(usmallint_col)) from super', - 'select ceil(max(usmallint_col)) from t1', - 'select ceil(max(utinyint_col)) from super', - 'select ceil(max(utinyint_col)) from t1', - 'select ceil(first(int_col)) from super', - 'select ceil(first(int_col)) from t1', - 'select ceil(first(bigint_col)) from super', - 'select ceil(first(bigint_col)) from t1', - 'select ceil(first(float_col)) from super', - 'select ceil(first(float_col)) from t1', - 'select ceil(first(double_col)) from super', - 'select ceil(first(double_col)) from t1', - 'select ceil(first(smallint_col)) from super', - 'select ceil(first(smallint_col)) from t1', - 'select ceil(first(tinyint_col)) from super', - 'select ceil(first(tinyint_col)) from t1', - 'select ceil(first(uint_col)) from super', - 'select ceil(first(uint_col)) from t1', - 'select ceil(first(ubigint_col)) from super', - 'select ceil(first(ubigint_col)) from t1', - 'select ceil(first(usmallint_col)) from super', - 'select ceil(first(usmallint_col)) from t1', - 'select ceil(first(utinyint_col)) from super', - 'select ceil(first(utinyint_col)) from t1', - 'select ceil(last(int_col)) from super', - 'select ceil(last(int_col)) from t1', - 'select ceil(last(bigint_col)) from super', - 'select ceil(last(bigint_col)) from t1', - 'select ceil(last(float_col)) from super', - 'select ceil(last(float_col)) from t1', - 'select ceil(last(double_col)) from super', - 'select ceil(last(double_col)) from t1', - 'select ceil(last(smallint_col)) from super', - 'select ceil(last(smallint_col)) from t1', - 'select ceil(last(tinyint_col)) from super', - 'select ceil(last(tinyint_col)) from t1', - 'select ceil(last(uint_col)) from super', - 'select ceil(last(uint_col)) from t1', - 'select ceil(last(ubigint_col)) from super', - 'select ceil(last(ubigint_col)) from t1', - 'select ceil(last(usmallint_col)) from super', - 'select ceil(last(usmallint_col)) from t1', - 'select ceil(last(utinyint_col)) from super', - 'select ceil(last(utinyint_col)) from t1', - 'select ceil(percentile(int_col, 1)) from t1', - 'select ceil(percentile(bigint_col, 1)) from t1', - 'select ceil(percentile(float_col, 1)) from t1', - 'select ceil(percentile(double_col, 1)) from t1', - 'select ceil(percentile(smallint_col, 1)) from t1', - 'select ceil(percentile(tinyint_col, 1)) from t1', - 'select ceil(percentile(uint_col, 1)) from t1', - 'select ceil(percentile(ubigint_col, 1)) from t1', - 'select ceil(percentile(usmallint_col, 1)) from t1', - 'select ceil(percentile(utinyint_col, 1)) from t1', - 'select ceil(apercentile(int_col, 1)) from super', - 'select ceil(apercentile(int_col, 1)) from t1', - 'select ceil(apercentile(bigint_col, 1)) from super', - 'select ceil(apercentile(bigint_col, 1)) from t1', - 'select ceil(apercentile(float_col, 1)) from super', - 'select ceil(apercentile(float_col, 1)) from t1', - 'select ceil(apercentile(double_col, 1)) from super', - 'select ceil(apercentile(double_col, 1)) from t1', - 'select ceil(apercentile(smallint_col, 1)) from super', - 'select ceil(apercentile(smallint_col, 1)) from t1', - 'select ceil(apercentile(tinyint_col, 1)) from super', - 'select ceil(apercentile(tinyint_col, 1)) from t1', - 'select ceil(apercentile(uint_col, 1)) from super', - 'select ceil(apercentile(uint_col, 1)) from t1', - 'select ceil(apercentile(ubigint_col, 1)) from super', - 'select ceil(apercentile(ubigint_col, 1)) from t1', - 'select ceil(apercentile(usmallint_col, 1)) from super', - 'select ceil(apercentile(usmallint_col, 1)) from t1', - 'select ceil(apercentile(utinyint_col, 1)) from super', - 'select ceil(apercentile(utinyint_col, 1)) from t1', - 'select ceil(last_row(int_col)) from super', - 'select ceil(last_row(int_col)) from t1', - 'select ceil(last_row(bigint_col)) from super', - 'select ceil(last_row(bigint_col)) from t1', - 'select ceil(last_row(float_col)) from super', - 'select ceil(last_row(float_col)) from t1', - 'select ceil(last_row(double_col)) from super', - 'select ceil(last_row(double_col)) from t1', - 'select ceil(last_row(smallint_col)) from super', - 'select ceil(last_row(smallint_col)) from t1', - 'select ceil(last_row(tinyint_col)) from super', - 'select ceil(last_row(tinyint_col)) from t1', - 'select ceil(last_row(uint_col)) from super', - 'select ceil(last_row(uint_col)) from t1', - 'select ceil(last_row(ubigint_col)) from super', - 'select ceil(last_row(ubigint_col)) from t1', - 'select ceil(last_row(usmallint_col)) from super', - 'select ceil(last_row(usmallint_col)) from t1', - 'select ceil(last_row(utinyint_col)) from super', - 'select ceil(last_row(utinyint_col)) from t1', - 'select ceil(spread(ts)) from super', - 'select ceil(spread(ts)) from t1', - 'select ceil(spread(timestamp_col)) from super', - 'select ceil(spread(timestamp_col)) from t1', - 'select ceil(spread(int_col)) from super', - 'select ceil(spread(int_col)) from t1', - 'select ceil(spread(bigint_col)) from super', - 'select ceil(spread(bigint_col)) from t1', - 'select ceil(spread(float_col)) from super', - 'select ceil(spread(float_col)) from t1', - 'select ceil(spread(double_col)) from super', - 'select ceil(spread(double_col)) from t1', - 'select ceil(spread(smallint_col)) from super', - 'select ceil(spread(smallint_col)) from t1', - 'select ceil(spread(tinyint_col)) from super', - 'select ceil(spread(tinyint_col)) from t1', - 'select ceil(spread(uint_col)) from super', - 'select ceil(spread(uint_col)) from t1', - 'select ceil(spread(ubigint_col)) from super', - 'select ceil(spread(ubigint_col)) from t1', - 'select ceil(spread(usmallint_col)) from super', - 'select ceil(spread(usmallint_col)) from t1', - 'select ceil(spread(utinyint_col)) from super', - 'select ceil(spread(utinyint_col)) from t1', - 'select ceil(int_col + int_col) from super', - 'select ceil(int_col + int_col) from t1', - 'select ceil(bigint_col + bigint_col) from super', - 'select ceil(bigint_col + bigint_col) from t1', - 'select ceil(float_col + float_col) from super', - 'select ceil(float_col + float_col) from t1', - 'select ceil(double_col + double_col) from super', - 'select ceil(double_col + double_col) from t1', - 'select ceil(smallint_col + smallint_col) from super', - 'select ceil(smallint_col + smallint_col) from t1', - 'select ceil(tinyint_col + tinyint_col) from super', - 'select ceil(tinyint_col + tinyint_col) from t1', - 'select ceil(uint_col + uint_col) from super', - 'select ceil(uint_col + uint_col) from t1', - 'select ceil(ubigint_col + ubigint_col) from super', - 'select ceil(ubigint_col + ubigint_col) from t1', - 'select ceil(usmallint_col + usmallint_col) from super', - 'select ceil(usmallint_col + usmallint_col) from t1', - 'select ceil(utinyint_col + utinyint_col) from super', - 'select ceil(utinyint_col + utinyint_col) from t1', - 'select ceil(int_col - int_col) from super', - 'select ceil(int_col - int_col) from t1', - 'select ceil(bigint_col - bigint_col) from super', - 'select ceil(bigint_col - bigint_col) from t1', - 'select ceil(float_col - float_col) from super', - 'select ceil(float_col - float_col) from t1', - 'select ceil(double_col - double_col) from super', - 'select ceil(double_col - double_col) from t1', - 'select ceil(smallint_col - smallint_col) from super', - 'select ceil(smallint_col - smallint_col) from t1', - 'select ceil(tinyint_col - tinyint_col) from super', - 'select ceil(tinyint_col - tinyint_col) from t1', - 'select ceil(uint_col - uint_col) from super', - 'select ceil(uint_col - uint_col) from t1', - 'select ceil(ubigint_col - ubigint_col) from super', - 'select ceil(ubigint_col - ubigint_col) from t1', - 'select ceil(usmallint_col - usmallint_col) from super', - 'select ceil(usmallint_col - usmallint_col) from t1', - 'select ceil(utinyint_col - utinyint_col) from super', - 'select ceil(utinyint_col - utinyint_col) from t1', - 'select ceil(int_col * int_col) from super', - 'select ceil(int_col * int_col) from t1', - 'select ceil(bigint_col * bigint_col) from super', - 'select ceil(bigint_col * bigint_col) from t1', - 'select ceil(float_col * float_col) from super', - 'select ceil(float_col * float_col) from t1', - 'select ceil(double_col * double_col) from super', - 'select ceil(double_col * double_col) from t1', - 'select ceil(smallint_col * smallint_col) from super', - 'select ceil(smallint_col * smallint_col) from t1', - 'select ceil(tinyint_col * tinyint_col) from super', - 'select ceil(tinyint_col * tinyint_col) from t1', - 'select ceil(uint_col * uint_col) from super', - 'select ceil(uint_col * uint_col) from t1', - 'select ceil(ubigint_col * ubigint_col) from super', - 'select ceil(ubigint_col * ubigint_col) from t1', - 'select ceil(usmallint_col * usmallint_col) from super', - 'select ceil(usmallint_col * usmallint_col) from t1', - 'select ceil(utinyint_col * utinyint_col) from super', - 'select ceil(utinyint_col * utinyint_col) from t1', - 'select ceil(int_col / int_col) from super', - 'select ceil(int_col / int_col) from t1', - 'select ceil(bigint_col / bigint_col) from super', - 'select ceil(bigint_col / bigint_col) from t1', - 'select ceil(float_col / float_col) from super', - 'select ceil(float_col / float_col) from t1', - 'select ceil(double_col / double_col) from super', - 'select ceil(double_col / double_col) from t1', - 'select ceil(smallint_col / smallint_col) from super', - 'select ceil(smallint_col / smallint_col) from t1', - 'select ceil(tinyint_col / tinyint_col) from super', - 'select ceil(tinyint_col / tinyint_col) from t1', - 'select ceil(uint_col / uint_col) from super', - 'select ceil(uint_col / uint_col) from t1', - 'select ceil(ubigint_col / ubigint_col) from super', - 'select ceil(ubigint_col / ubigint_col) from t1', - 'select ceil(usmallint_col / usmallint_col) from super', - 'select ceil(usmallint_col / usmallint_col) from t1', - 'select ceil(utinyint_col / utinyint_col) from super', - 'select ceil(utinyint_col / utinyint_col) from t1', - 'select int_col, ceil(int_col), int_col from super', - 'select int_col, ceil(int_col), int_col from t1', - 'select bigint_col, ceil(bigint_col), bigint_col from super', - 'select bigint_col, ceil(bigint_col), bigint_col from t1', - 'select float_col, ceil(float_col), float_col from super', - 'select float_col, ceil(float_col), float_col from t1', - 'select double_col, ceil(double_col), double_col from super', - 'select double_col, ceil(double_col), double_col from t1', - 'select smallint_col, ceil(smallint_col), smallint_col from super', - 'select smallint_col, ceil(smallint_col), smallint_col from t1', - 'select tinyint_col, ceil(tinyint_col), tinyint_col from super', - 'select tinyint_col, ceil(tinyint_col), tinyint_col from t1', - 'select uint_col, ceil(uint_col), uint_col from super', - 'select uint_col, ceil(uint_col), uint_col from t1', - 'select ubigint_col, ceil(ubigint_col), ubigint_col from super', - 'select ubigint_col, ceil(ubigint_col), ubigint_col from t1', - 'select usmallint_col, ceil(usmallint_col), usmallint_col from super', - 'select usmallint_col, ceil(usmallint_col), usmallint_col from t1', - 'select utinyint_col, ceil(utinyint_col), utinyint_col from super', - 'select utinyint_col, ceil(utinyint_col), utinyint_col from t1', - 'select 1, ceil(int_col), 1 from super', - 'select 1, ceil(int_col), 1 from t1', - 'select 1, ceil(bigint_col), 1 from super', - 'select 1, ceil(bigint_col), 1 from t1', - 'select 1, ceil(float_col), 1 from super', - 'select 1, ceil(float_col), 1 from t1', - 'select 1, ceil(double_col), 1 from super', - 'select 1, ceil(double_col), 1 from t1', - 'select 1, ceil(smallint_col), 1 from super', - 'select 1, ceil(smallint_col), 1 from t1', - 'select 1, ceil(tinyint_col), 1 from super', - 'select 1, ceil(tinyint_col), 1 from t1', - 'select 1, ceil(uint_col), 1 from super', - 'select 1, ceil(uint_col), 1 from t1', - 'select 1, ceil(ubigint_col), 1 from super', - 'select 1, ceil(ubigint_col), 1 from t1', - 'select 1, ceil(usmallint_col), 1 from super', - 'select 1, ceil(usmallint_col), 1 from t1', - 'select 1, ceil(utinyint_col), 1 from super', - 'select 1, ceil(utinyint_col), 1 from t1', - 'select ceil(int_col) as anyName from super', - 'select ceil(int_col) as anyName from t1', - 'select ceil(bigint_col) as anyName from super', - 'select ceil(bigint_col) as anyName from t1', - 'select ceil(float_col) as anyName from super', - 'select ceil(float_col) as anyName from t1', - 'select ceil(double_col) as anyName from super', - 'select ceil(double_col) as anyName from t1', - 'select ceil(smallint_col) as anyName from super', - 'select ceil(smallint_col) as anyName from t1', - 'select ceil(tinyint_col) as anyName from super', - 'select ceil(tinyint_col) as anyName from t1', - 'select ceil(uint_col) as anyName from super', - 'select ceil(uint_col) as anyName from t1', - 'select ceil(ubigint_col) as anyName from super', - 'select ceil(ubigint_col) as anyName from t1', - 'select ceil(usmallint_col) as anyName from super', - 'select ceil(usmallint_col) as anyName from t1', - 'select ceil(utinyint_col) as anyName from super', - 'select ceil(utinyint_col) as anyName from t1'] + 'select ceil(int_col) from t1', + 'select ceil(bigint_col) from super', + 'select ceil(bigint_col) from t1', + 'select ceil(float_col) from super', + 'select ceil(float_col) from t1', + 'select ceil(double_col) from super', + 'select ceil(double_col) from t1', + 'select ceil(smallint_col) from super', + 'select ceil(smallint_col) from t1', + 'select ceil(tinyint_col) from super', + 'select ceil(tinyint_col) from t1', + 'select ceil(uint_col) from super', + 'select ceil(uint_col) from t1', + 'select ceil(ubigint_col) from super', + 'select ceil(ubigint_col) from t1', + 'select ceil(usmallint_col) from super', + 'select ceil(usmallint_col) from t1', + 'select ceil(utinyint_col) from super', + 'select ceil(utinyint_col) from t1', + 'select ceil(int_col) - ceil(int_col) from super', + 'select ceil(int_col) - ceil(int_col) from t1', + 'select ceil(bigint_col) - ceil(bigint_col) from super', + 'select ceil(bigint_col) - ceil(bigint_col) from t1', + 'select ceil(float_col) - ceil(float_col) from super', + 'select ceil(float_col) - ceil(float_col) from t1', + 'select ceil(double_col) - ceil(double_col) from super', + 'select ceil(double_col) - ceil(double_col) from t1', + 'select ceil(smallint_col) - ceil(smallint_col) from super', + 'select ceil(smallint_col) - ceil(smallint_col) from t1', + 'select ceil(tinyint_col) - ceil(tinyint_col) from super', + 'select ceil(tinyint_col) - ceil(tinyint_col) from t1', + 'select ceil(uint_col) - ceil(uint_col) from super', + 'select ceil(uint_col) - ceil(uint_col) from t1', + 'select ceil(ubigint_col) - ceil(ubigint_col) from super', + 'select ceil(ubigint_col) - ceil(ubigint_col) from t1', + 'select ceil(usmallint_col) - ceil(usmallint_col) from super', + 'select ceil(usmallint_col) - ceil(usmallint_col) from t1', + 'select ceil(utinyint_col) - ceil(utinyint_col) from super', + 'select ceil(utinyint_col) - ceil(utinyint_col) from t1', + 'select ceil(int_col) / ceil(int_col) from super', + 'select ceil(int_col) / ceil(int_col) from t1', + 'select ceil(bigint_col) / ceil(bigint_col) from super', + 'select ceil(bigint_col) / ceil(bigint_col) from t1', + 'select ceil(float_col) / ceil(float_col) from super', + 'select ceil(float_col) / ceil(float_col) from t1', + 'select ceil(double_col) / ceil(double_col) from super', + 'select ceil(double_col) / ceil(double_col) from t1', + 'select ceil(smallint_col) / ceil(smallint_col) from super', + 'select ceil(smallint_col) / ceil(smallint_col) from t1', + 'select ceil(tinyint_col) / ceil(tinyint_col) from super', + 'select ceil(tinyint_col) / ceil(tinyint_col) from t1', + 'select ceil(uint_col) / ceil(uint_col) from super', + 'select ceil(uint_col) / ceil(uint_col) from t1', + 'select ceil(ubigint_col) / ceil(ubigint_col) from super', + 'select ceil(ubigint_col) / ceil(ubigint_col) from t1', + 'select ceil(usmallint_col) / ceil(usmallint_col) from super', + 'select ceil(usmallint_col) / ceil(usmallint_col) from t1', + 'select ceil(utinyint_col) / ceil(utinyint_col) from super', + 'select ceil(utinyint_col) / ceil(utinyint_col) from t1', + 'select ceil(int_col) * ceil(int_col) from super', + 'select ceil(int_col) * ceil(int_col) from t1', + 'select ceil(bigint_col) * ceil(bigint_col) from super', + 'select ceil(bigint_col) * ceil(bigint_col) from t1', + 'select ceil(float_col) * ceil(float_col) from super', + 'select ceil(float_col) * ceil(float_col) from t1', + 'select ceil(double_col) * ceil(double_col) from super', + 'select ceil(double_col) * ceil(double_col) from t1', + 'select ceil(smallint_col) * ceil(smallint_col) from super', + 'select ceil(smallint_col) * ceil(smallint_col) from t1', + 'select ceil(tinyint_col) * ceil(tinyint_col) from super', + 'select ceil(tinyint_col) * ceil(tinyint_col) from t1', + 'select ceil(uint_col) * ceil(uint_col) from super', + 'select ceil(uint_col) * ceil(uint_col) from t1', + 'select ceil(ubigint_col) * ceil(ubigint_col) from super', + 'select ceil(ubigint_col) * ceil(ubigint_col) from t1', + 'select ceil(usmallint_col) * ceil(usmallint_col) from super', + 'select ceil(usmallint_col) * ceil(usmallint_col) from t1', + 'select ceil(utinyint_col) * ceil(utinyint_col) from super', + 'select ceil(utinyint_col) * ceil(utinyint_col) from t1', + 'select ceil(count(ts)) from super', + 'select ceil(count(ts)) from t1', + 'select ceil(count(timestamp_col)) from super', + 'select ceil(count(timestamp_col)) from t1', + 'select ceil(count(int_col)) from super', + 'select ceil(count(int_col)) from t1', + 'select ceil(count(bigint_col)) from super', + 'select ceil(count(bigint_col)) from t1', + 'select ceil(count(float_col)) from super', + 'select ceil(count(float_col)) from t1', + 'select ceil(count(double_col)) from super', + 'select ceil(count(double_col)) from t1', + 'select ceil(count(binary_col)) from super', + 'select ceil(count(binary_col)) from t1', + 'select ceil(count(smallint_col)) from super', + 'select ceil(count(smallint_col)) from t1', + 'select ceil(count(tinyint_col)) from super', + 'select ceil(count(tinyint_col)) from t1', + 'select ceil(count(bool_col)) from super', + 'select ceil(count(bool_col)) from t1', + 'select ceil(count(nchar_col)) from super', + 'select ceil(count(nchar_col)) from t1', + 'select ceil(count(uint_col)) from super', + 'select ceil(count(uint_col)) from t1', + 'select ceil(count(ubigint_col)) from super', + 'select ceil(count(ubigint_col)) from t1', + 'select ceil(count(usmallint_col)) from super', + 'select ceil(count(usmallint_col)) from t1', + 'select ceil(count(utinyint_col)) from super', + 'select ceil(count(utinyint_col)) from t1', + 'select ceil(count(timestamp_tag)) from super', + 'select ceil(count(timestamp_tag)) from t1', + 'select ceil(count(int_tag)) from super', + 'select ceil(count(int_tag)) from t1', + 'select ceil(count(bigint_tag)) from super', + 'select ceil(count(bigint_tag)) from t1', + 'select ceil(count(float_tag)) from super', + 'select ceil(count(float_tag)) from t1', + 'select ceil(count(double_tag)) from super', + 'select ceil(count(double_tag)) from t1', + 'select ceil(count(binary_tag)) from super', + 'select ceil(count(binary_tag)) from t1', + 'select ceil(count(smallint_tag)) from super', + 'select ceil(count(smallint_tag)) from t1', + 'select ceil(count(tinyint_tag)) from super', + 'select ceil(count(tinyint_tag)) from t1', + 'select ceil(count(bool_tag)) from super', + 'select ceil(count(bool_tag)) from t1', + 'select ceil(count(nchar_tag)) from super', + 'select ceil(count(nchar_tag)) from t1', + 'select ceil(count(uint_tag)) from super', + 'select ceil(count(uint_tag)) from t1', + 'select ceil(count(ubigint_tag)) from super', + 'select ceil(count(ubigint_tag)) from t1', + 'select ceil(count(usmallint_tag)) from super', + 'select ceil(count(usmallint_tag)) from t1', + 'select ceil(count(utinyint_tag)) from super', + 'select ceil(count(utinyint_tag)) from t1', + 'select ceil(avg(int_col)) from super', + 'select ceil(avg(int_col)) from t1', + 'select ceil(avg(bigint_col)) from super', + 'select ceil(avg(bigint_col)) from t1', + 'select ceil(avg(float_col)) from super', + 'select ceil(avg(float_col)) from t1', + 'select ceil(avg(double_col)) from super', + 'select ceil(avg(double_col)) from t1', + 'select ceil(avg(smallint_col)) from super', + 'select ceil(avg(smallint_col)) from t1', + 'select ceil(avg(tinyint_col)) from super', + 'select ceil(avg(tinyint_col)) from t1', + 'select ceil(avg(uint_col)) from super', + 'select ceil(avg(uint_col)) from t1', + 'select ceil(avg(ubigint_col)) from super', + 'select ceil(avg(ubigint_col)) from t1', + 'select ceil(avg(usmallint_col)) from super', + 'select ceil(avg(usmallint_col)) from t1', + 'select ceil(avg(utinyint_col)) from super', + 'select ceil(avg(utinyint_col)) from t1', + 'select ceil(twa(int_col)) from t1', + 'select ceil(twa(bigint_col)) from t1', + 'select ceil(twa(float_col)) from t1', + 'select ceil(twa(double_col)) from t1', + 'select ceil(twa(smallint_col)) from t1', + 'select ceil(twa(tinyint_col)) from t1', + 'select ceil(twa(uint_col)) from t1', + 'select ceil(twa(ubigint_col)) from t1', + 'select ceil(twa(usmallint_col)) from t1', + 'select ceil(twa(utinyint_col)) from t1', + 'select ceil(sum(int_col)) from super', + 'select ceil(sum(int_col)) from t1', + 'select ceil(sum(bigint_col)) from super', + 'select ceil(sum(bigint_col)) from t1', + 'select ceil(sum(float_col)) from super', + 'select ceil(sum(float_col)) from t1', + 'select ceil(sum(double_col)) from super', + 'select ceil(sum(double_col)) from t1', + 'select ceil(sum(smallint_col)) from super', + 'select ceil(sum(smallint_col)) from t1', + 'select ceil(sum(tinyint_col)) from super', + 'select ceil(sum(tinyint_col)) from t1', + 'select ceil(sum(uint_col)) from super', + 'select ceil(sum(uint_col)) from t1', + 'select ceil(sum(ubigint_col)) from super', + 'select ceil(sum(ubigint_col)) from t1', + 'select ceil(sum(usmallint_col)) from super', + 'select ceil(sum(usmallint_col)) from t1', + 'select ceil(sum(utinyint_col)) from super', + 'select ceil(sum(utinyint_col)) from t1', + 'select ceil(stddev(int_col)) from super', + 'select ceil(stddev(int_col)) from t1', + 'select ceil(stddev(bigint_col)) from super', + 'select ceil(stddev(bigint_col)) from t1', + 'select ceil(stddev(float_col)) from super', + 'select ceil(stddev(float_col)) from t1', + 'select ceil(stddev(double_col)) from super', + 'select ceil(stddev(double_col)) from t1', + 'select ceil(stddev(smallint_col)) from super', + 'select ceil(stddev(smallint_col)) from t1', + 'select ceil(stddev(tinyint_col)) from super', + 'select ceil(stddev(tinyint_col)) from t1', + 'select ceil(stddev(uint_col)) from super', + 'select ceil(stddev(uint_col)) from t1', + 'select ceil(stddev(ubigint_col)) from super', + 'select ceil(stddev(ubigint_col)) from t1', + 'select ceil(stddev(usmallint_col)) from super', + 'select ceil(stddev(usmallint_col)) from t1', + 'select ceil(stddev(utinyint_col)) from super', + 'select ceil(stddev(utinyint_col)) from t1', + 'select ceil(irate(int_col)) from t1', + 'select ceil(irate(bigint_col)) from t1', + 'select ceil(irate(float_col)) from t1', + 'select ceil(irate(double_col)) from t1', + 'select ceil(irate(smallint_col)) from t1', + 'select ceil(irate(tinyint_col)) from t1', + 'select ceil(irate(uint_col)) from t1', + 'select ceil(irate(ubigint_col)) from t1', + 'select ceil(irate(usmallint_col)) from t1', + 'select ceil(irate(utinyint_col)) from t1', + 'select ceil(min(int_col)) from super', + 'select ceil(min(int_col)) from t1', + 'select ceil(min(bigint_col)) from super', + 'select ceil(min(bigint_col)) from t1', + 'select ceil(min(float_col)) from super', + 'select ceil(min(float_col)) from t1', + 'select ceil(min(double_col)) from super', + 'select ceil(min(double_col)) from t1', + 'select ceil(min(smallint_col)) from super', + 'select ceil(min(smallint_col)) from t1', + 'select ceil(min(tinyint_col)) from super', + 'select ceil(min(tinyint_col)) from t1', + 'select ceil(min(uint_col)) from super', + 'select ceil(min(uint_col)) from t1', + 'select ceil(min(ubigint_col)) from super', + 'select ceil(min(ubigint_col)) from t1', + 'select ceil(min(usmallint_col)) from super', + 'select ceil(min(usmallint_col)) from t1', + 'select ceil(min(utinyint_col)) from super', + 'select ceil(min(utinyint_col)) from t1', + 'select ceil(max(int_col)) from super', + 'select ceil(max(int_col)) from t1', + 'select ceil(max(bigint_col)) from super', + 'select ceil(max(bigint_col)) from t1', + 'select ceil(max(float_col)) from super', + 'select ceil(max(float_col)) from t1', + 'select ceil(max(double_col)) from super', + 'select ceil(max(double_col)) from t1', + 'select ceil(max(smallint_col)) from super', + 'select ceil(max(smallint_col)) from t1', + 'select ceil(max(tinyint_col)) from super', + 'select ceil(max(tinyint_col)) from t1', + 'select ceil(max(uint_col)) from super', + 'select ceil(max(uint_col)) from t1', + 'select ceil(max(ubigint_col)) from super', + 'select ceil(max(ubigint_col)) from t1', + 'select ceil(max(usmallint_col)) from super', + 'select ceil(max(usmallint_col)) from t1', + 'select ceil(max(utinyint_col)) from super', + 'select ceil(max(utinyint_col)) from t1', + 'select ceil(first(int_col)) from super', + 'select ceil(first(int_col)) from t1', + 'select ceil(first(bigint_col)) from super', + 'select ceil(first(bigint_col)) from t1', + 'select ceil(first(float_col)) from super', + 'select ceil(first(float_col)) from t1', + 'select ceil(first(double_col)) from super', + 'select ceil(first(double_col)) from t1', + 'select ceil(first(smallint_col)) from super', + 'select ceil(first(smallint_col)) from t1', + 'select ceil(first(tinyint_col)) from super', + 'select ceil(first(tinyint_col)) from t1', + 'select ceil(first(uint_col)) from super', + 'select ceil(first(uint_col)) from t1', + 'select ceil(first(ubigint_col)) from super', + 'select ceil(first(ubigint_col)) from t1', + 'select ceil(first(usmallint_col)) from super', + 'select ceil(first(usmallint_col)) from t1', + 'select ceil(first(utinyint_col)) from super', + 'select ceil(first(utinyint_col)) from t1', + 'select ceil(last(int_col)) from super', + 'select ceil(last(int_col)) from t1', + 'select ceil(last(bigint_col)) from super', + 'select ceil(last(bigint_col)) from t1', + 'select ceil(last(float_col)) from super', + 'select ceil(last(float_col)) from t1', + 'select ceil(last(double_col)) from super', + 'select ceil(last(double_col)) from t1', + 'select ceil(last(smallint_col)) from super', + 'select ceil(last(smallint_col)) from t1', + 'select ceil(last(tinyint_col)) from super', + 'select ceil(last(tinyint_col)) from t1', + 'select ceil(last(uint_col)) from super', + 'select ceil(last(uint_col)) from t1', + 'select ceil(last(ubigint_col)) from super', + 'select ceil(last(ubigint_col)) from t1', + 'select ceil(last(usmallint_col)) from super', + 'select ceil(last(usmallint_col)) from t1', + 'select ceil(last(utinyint_col)) from super', + 'select ceil(last(utinyint_col)) from t1', + 'select ceil(percentile(int_col, 1)) from t1', + 'select ceil(percentile(bigint_col, 1)) from t1', + 'select ceil(percentile(float_col, 1)) from t1', + 'select ceil(percentile(double_col, 1)) from t1', + 'select ceil(percentile(smallint_col, 1)) from t1', + 'select ceil(percentile(tinyint_col, 1)) from t1', + 'select ceil(percentile(uint_col, 1)) from t1', + 'select ceil(percentile(ubigint_col, 1)) from t1', + 'select ceil(percentile(usmallint_col, 1)) from t1', + 'select ceil(percentile(utinyint_col, 1)) from t1', + 'select ceil(apercentile(int_col, 1)) from super', + 'select ceil(apercentile(int_col, 1)) from t1', + 'select ceil(apercentile(bigint_col, 1)) from super', + 'select ceil(apercentile(bigint_col, 1)) from t1', + 'select ceil(apercentile(float_col, 1)) from super', + 'select ceil(apercentile(float_col, 1)) from t1', + 'select ceil(apercentile(double_col, 1)) from super', + 'select ceil(apercentile(double_col, 1)) from t1', + 'select ceil(apercentile(smallint_col, 1)) from super', + 'select ceil(apercentile(smallint_col, 1)) from t1', + 'select ceil(apercentile(tinyint_col, 1)) from super', + 'select ceil(apercentile(tinyint_col, 1)) from t1', + 'select ceil(apercentile(uint_col, 1)) from super', + 'select ceil(apercentile(uint_col, 1)) from t1', + 'select ceil(apercentile(ubigint_col, 1)) from super', + 'select ceil(apercentile(ubigint_col, 1)) from t1', + 'select ceil(apercentile(usmallint_col, 1)) from super', + 'select ceil(apercentile(usmallint_col, 1)) from t1', + 'select ceil(apercentile(utinyint_col, 1)) from super', + 'select ceil(apercentile(utinyint_col, 1)) from t1', + 'select ceil(last_row(int_col)) from super', + 'select ceil(last_row(int_col)) from t1', + 'select ceil(last_row(bigint_col)) from super', + 'select ceil(last_row(bigint_col)) from t1', + 'select ceil(last_row(float_col)) from super', + 'select ceil(last_row(float_col)) from t1', + 'select ceil(last_row(double_col)) from super', + 'select ceil(last_row(double_col)) from t1', + 'select ceil(last_row(smallint_col)) from super', + 'select ceil(last_row(smallint_col)) from t1', + 'select ceil(last_row(tinyint_col)) from super', + 'select ceil(last_row(tinyint_col)) from t1', + 'select ceil(last_row(uint_col)) from super', + 'select ceil(last_row(uint_col)) from t1', + 'select ceil(last_row(ubigint_col)) from super', + 'select ceil(last_row(ubigint_col)) from t1', + 'select ceil(last_row(usmallint_col)) from super', + 'select ceil(last_row(usmallint_col)) from t1', + 'select ceil(last_row(utinyint_col)) from super', + 'select ceil(last_row(utinyint_col)) from t1', + 'select ceil(interp(int_col)) from t1', + 'select ceil(interp(bigint_col)) from t1', + 'select ceil(interp(float_col)) from t1', + 'select ceil(interp(double_col)) from t1', + 'select ceil(interp(smallint_col)) from t1', + 'select ceil(interp(tinyint_col)) from t1', + 'select ceil(interp(uint_col)) from t1', + 'select ceil(interp(ubigint_col)) from t1', + 'select ceil(interp(usmallint_col)) from t1', + 'select ceil(interp(utinyint_col)) from t1', + 'select ceil(spread(ts)) from super', + 'select ceil(spread(ts)) from t1', + 'select ceil(spread(timestamp_col)) from super', + 'select ceil(spread(timestamp_col)) from t1', + 'select ceil(spread(int_col)) from super', + 'select ceil(spread(int_col)) from t1', + 'select ceil(spread(bigint_col)) from super', + 'select ceil(spread(bigint_col)) from t1', + 'select ceil(spread(float_col)) from super', + 'select ceil(spread(float_col)) from t1', + 'select ceil(spread(double_col)) from super', + 'select ceil(spread(double_col)) from t1', + 'select ceil(spread(smallint_col)) from super', + 'select ceil(spread(smallint_col)) from t1', + 'select ceil(spread(tinyint_col)) from super', + 'select ceil(spread(tinyint_col)) from t1', + 'select ceil(spread(uint_col)) from super', + 'select ceil(spread(uint_col)) from t1', + 'select ceil(spread(ubigint_col)) from super', + 'select ceil(spread(ubigint_col)) from t1', + 'select ceil(spread(usmallint_col)) from super', + 'select ceil(spread(usmallint_col)) from t1', + 'select ceil(spread(utinyint_col)) from super', + 'select ceil(spread(utinyint_col)) from t1', + 'select ceil(int_col + int_col) from super', + 'select ceil(int_col + int_col) from t1', + 'select ceil(bigint_col + bigint_col) from super', + 'select ceil(bigint_col + bigint_col) from t1', + 'select ceil(float_col + float_col) from super', + 'select ceil(float_col + float_col) from t1', + 'select ceil(double_col + double_col) from super', + 'select ceil(double_col + double_col) from t1', + 'select ceil(smallint_col + smallint_col) from super', + 'select ceil(smallint_col + smallint_col) from t1', + 'select ceil(tinyint_col + tinyint_col) from super', + 'select ceil(tinyint_col + tinyint_col) from t1', + 'select ceil(uint_col + uint_col) from super', + 'select ceil(uint_col + uint_col) from t1', + 'select ceil(ubigint_col + ubigint_col) from super', + 'select ceil(ubigint_col + ubigint_col) from t1', + 'select ceil(usmallint_col + usmallint_col) from super', + 'select ceil(usmallint_col + usmallint_col) from t1', + 'select ceil(utinyint_col + utinyint_col) from super', + 'select ceil(utinyint_col + utinyint_col) from t1', + 'select ceil(int_col - int_col) from super', + 'select ceil(int_col - int_col) from t1', + 'select ceil(bigint_col - bigint_col) from super', + 'select ceil(bigint_col - bigint_col) from t1', + 'select ceil(float_col - float_col) from super', + 'select ceil(float_col - float_col) from t1', + 'select ceil(double_col - double_col) from super', + 'select ceil(double_col - double_col) from t1', + 'select ceil(smallint_col - smallint_col) from super', + 'select ceil(smallint_col - smallint_col) from t1', + 'select ceil(tinyint_col - tinyint_col) from super', + 'select ceil(tinyint_col - tinyint_col) from t1', + 'select ceil(uint_col - uint_col) from super', + 'select ceil(uint_col - uint_col) from t1', + 'select ceil(ubigint_col - ubigint_col) from super', + 'select ceil(ubigint_col - ubigint_col) from t1', + 'select ceil(usmallint_col - usmallint_col) from super', + 'select ceil(usmallint_col - usmallint_col) from t1', + 'select ceil(utinyint_col - utinyint_col) from super', + 'select ceil(utinyint_col - utinyint_col) from t1', + 'select ceil(int_col * int_col) from super', + 'select ceil(int_col * int_col) from t1', + 'select ceil(bigint_col * bigint_col) from super', + 'select ceil(bigint_col * bigint_col) from t1', + 'select ceil(float_col * float_col) from super', + 'select ceil(float_col * float_col) from t1', + 'select ceil(double_col * double_col) from super', + 'select ceil(double_col * double_col) from t1', + 'select ceil(smallint_col * smallint_col) from super', + 'select ceil(smallint_col * smallint_col) from t1', + 'select ceil(tinyint_col * tinyint_col) from super', + 'select ceil(tinyint_col * tinyint_col) from t1', + 'select ceil(uint_col * uint_col) from super', + 'select ceil(uint_col * uint_col) from t1', + 'select ceil(ubigint_col * ubigint_col) from super', + 'select ceil(ubigint_col * ubigint_col) from t1', + 'select ceil(usmallint_col * usmallint_col) from super', + 'select ceil(usmallint_col * usmallint_col) from t1', + 'select ceil(utinyint_col * utinyint_col) from super', + 'select ceil(utinyint_col * utinyint_col) from t1', + 'select ceil(int_col / int_col) from super', + 'select ceil(int_col / int_col) from t1', + 'select ceil(bigint_col / bigint_col) from super', + 'select ceil(bigint_col / bigint_col) from t1', + 'select ceil(float_col / float_col) from super', + 'select ceil(float_col / float_col) from t1', + 'select ceil(double_col / double_col) from super', + 'select ceil(double_col / double_col) from t1', + 'select ceil(smallint_col / smallint_col) from super', + 'select ceil(smallint_col / smallint_col) from t1', + 'select ceil(tinyint_col / tinyint_col) from super', + 'select ceil(tinyint_col / tinyint_col) from t1', + 'select ceil(uint_col / uint_col) from super', + 'select ceil(uint_col / uint_col) from t1', + 'select ceil(ubigint_col / ubigint_col) from super', + 'select ceil(ubigint_col / ubigint_col) from t1', + 'select ceil(usmallint_col / usmallint_col) from super', + 'select ceil(usmallint_col / usmallint_col) from t1', + 'select ceil(utinyint_col / utinyint_col) from super', + 'select ceil(utinyint_col / utinyint_col) from t1', + 'select int_col, ceil(int_col), int_col from super', + 'select int_col, ceil(int_col), int_col from t1', + 'select bigint_col, ceil(bigint_col), bigint_col from super', + 'select bigint_col, ceil(bigint_col), bigint_col from t1', + 'select float_col, ceil(float_col), float_col from super', + 'select float_col, ceil(float_col), float_col from t1', + 'select double_col, ceil(double_col), double_col from super', + 'select double_col, ceil(double_col), double_col from t1', + 'select smallint_col, ceil(smallint_col), smallint_col from super', + 'select smallint_col, ceil(smallint_col), smallint_col from t1', + 'select tinyint_col, ceil(tinyint_col), tinyint_col from super', + 'select tinyint_col, ceil(tinyint_col), tinyint_col from t1', + 'select uint_col, ceil(uint_col), uint_col from super', + 'select uint_col, ceil(uint_col), uint_col from t1', + 'select ubigint_col, ceil(ubigint_col), ubigint_col from super', + 'select ubigint_col, ceil(ubigint_col), ubigint_col from t1', + 'select usmallint_col, ceil(usmallint_col), usmallint_col from super', + 'select usmallint_col, ceil(usmallint_col), usmallint_col from t1', + 'select utinyint_col, ceil(utinyint_col), utinyint_col from super', + 'select utinyint_col, ceil(utinyint_col), utinyint_col from t1', + 'select 1, ceil(int_col), 1 from super', + 'select 1, ceil(int_col), 1 from t1', + 'select 1, ceil(bigint_col), 1 from super', + 'select 1, ceil(bigint_col), 1 from t1', + 'select 1, ceil(float_col), 1 from super', + 'select 1, ceil(float_col), 1 from t1', + 'select 1, ceil(double_col), 1 from super', + 'select 1, ceil(double_col), 1 from t1', + 'select 1, ceil(smallint_col), 1 from super', + 'select 1, ceil(smallint_col), 1 from t1', + 'select 1, ceil(tinyint_col), 1 from super', + 'select 1, ceil(tinyint_col), 1 from t1', + 'select 1, ceil(uint_col), 1 from super', + 'select 1, ceil(uint_col), 1 from t1', + 'select 1, ceil(ubigint_col), 1 from super', + 'select 1, ceil(ubigint_col), 1 from t1', + 'select 1, ceil(usmallint_col), 1 from super', + 'select 1, ceil(usmallint_col), 1 from t1', + 'select 1, ceil(utinyint_col), 1 from super', + 'select 1, ceil(utinyint_col), 1 from t1', + 'select ceil(int_col) as anyName from super', + 'select ceil(int_col) as anyName from t1', + 'select ceil(bigint_col) as anyName from super', + 'select ceil(bigint_col) as anyName from t1', + 'select ceil(float_col) as anyName from super', + 'select ceil(float_col) as anyName from t1', + 'select ceil(double_col) as anyName from super', + 'select ceil(double_col) as anyName from t1', + 'select ceil(smallint_col) as anyName from super', + 'select ceil(smallint_col) as anyName from t1', + 'select ceil(tinyint_col) as anyName from super', + 'select ceil(tinyint_col) as anyName from t1', + 'select ceil(uint_col) as anyName from super', + 'select ceil(uint_col) as anyName from t1', + 'select ceil(ubigint_col) as anyName from super', + 'select ceil(ubigint_col) as anyName from t1', + 'select ceil(usmallint_col) as anyName from super', + 'select ceil(usmallint_col) as anyName from t1', + 'select ceil(utinyint_col) as anyName from super', + 'select ceil(utinyint_col) as anyName from t1'] for s in range(len(select_command)): for f in range(len(from_command)): sql = "select " + select_command[s] + from_command[f] diff --git a/tests/pytest/functions/function_floor.py b/tests/pytest/functions/function_floor.py index d501758105ec339de221a50bcda2fe6cffa38c5b..562bbbc4724e9d7bad9bc8807c0cdd57972a157d 100644 --- a/tests/pytest/functions/function_floor.py +++ b/tests/pytest/functions/function_floor.py @@ -1373,517 +1373,529 @@ class TDTestCase: self.randomUTinyint())) shouldPass = ['select floor(int_col) from super', - 'select floor(int_col) from t1', - 'select floor(bigint_col) from super', - 'select floor(bigint_col) from t1', - 'select floor(float_col) from super', - 'select floor(float_col) from t1', - 'select floor(double_col) from super', - 'select floor(double_col) from t1', - 'select floor(smallint_col) from super', - 'select floor(smallint_col) from t1', - 'select floor(tinyint_col) from super', - 'select floor(tinyint_col) from t1', - 'select floor(uint_col) from super', - 'select floor(uint_col) from t1', - 'select floor(ubigint_col) from super', - 'select floor(ubigint_col) from t1', - 'select floor(usmallint_col) from super', - 'select floor(usmallint_col) from t1', - 'select floor(utinyint_col) from super', - 'select floor(utinyint_col) from t1', - 'select floor(int_col) - floor(int_col) from super', - 'select floor(int_col) - floor(int_col) from t1', - 'select floor(bigint_col) - floor(bigint_col) from super', - 'select floor(bigint_col) - floor(bigint_col) from t1', - 'select floor(float_col) - floor(float_col) from super', - 'select floor(float_col) - floor(float_col) from t1', - 'select floor(double_col) - floor(double_col) from super', - 'select floor(double_col) - floor(double_col) from t1', - 'select floor(smallint_col) - floor(smallint_col) from super', - 'select floor(smallint_col) - floor(smallint_col) from t1', - 'select floor(tinyint_col) - floor(tinyint_col) from super', - 'select floor(tinyint_col) - floor(tinyint_col) from t1', - 'select floor(uint_col) - floor(uint_col) from super', - 'select floor(uint_col) - floor(uint_col) from t1', - 'select floor(ubigint_col) - floor(ubigint_col) from super', - 'select floor(ubigint_col) - floor(ubigint_col) from t1', - 'select floor(usmallint_col) - floor(usmallint_col) from super', - 'select floor(usmallint_col) - floor(usmallint_col) from t1', - 'select floor(utinyint_col) - floor(utinyint_col) from super', - 'select floor(utinyint_col) - floor(utinyint_col) from t1', - 'select floor(int_col) / floor(int_col) from super', - 'select floor(int_col) / floor(int_col) from t1', - 'select floor(bigint_col) / floor(bigint_col) from super', - 'select floor(bigint_col) / floor(bigint_col) from t1', - 'select floor(float_col) / floor(float_col) from super', - 'select floor(float_col) / floor(float_col) from t1', - 'select floor(double_col) / floor(double_col) from super', - 'select floor(double_col) / floor(double_col) from t1', - 'select floor(smallint_col) / floor(smallint_col) from super', - 'select floor(smallint_col) / floor(smallint_col) from t1', - 'select floor(tinyint_col) / floor(tinyint_col) from super', - 'select floor(tinyint_col) / floor(tinyint_col) from t1', - 'select floor(uint_col) / floor(uint_col) from super', - 'select floor(uint_col) / floor(uint_col) from t1', - 'select floor(ubigint_col) / floor(ubigint_col) from super', - 'select floor(ubigint_col) / floor(ubigint_col) from t1', - 'select floor(usmallint_col) / floor(usmallint_col) from super', - 'select floor(usmallint_col) / floor(usmallint_col) from t1', - 'select floor(utinyint_col) / floor(utinyint_col) from super', - 'select floor(utinyint_col) / floor(utinyint_col) from t1', - 'select floor(int_col) * floor(int_col) from super', - 'select floor(int_col) * floor(int_col) from t1', - 'select floor(bigint_col) * floor(bigint_col) from super', - 'select floor(bigint_col) * floor(bigint_col) from t1', - 'select floor(float_col) * floor(float_col) from super', - 'select floor(float_col) * floor(float_col) from t1', - 'select floor(double_col) * floor(double_col) from super', - 'select floor(double_col) * floor(double_col) from t1', - 'select floor(smallint_col) * floor(smallint_col) from super', - 'select floor(smallint_col) * floor(smallint_col) from t1', - 'select floor(tinyint_col) * floor(tinyint_col) from super', - 'select floor(tinyint_col) * floor(tinyint_col) from t1', - 'select floor(uint_col) * floor(uint_col) from super', - 'select floor(uint_col) * floor(uint_col) from t1', - 'select floor(ubigint_col) * floor(ubigint_col) from super', - 'select floor(ubigint_col) * floor(ubigint_col) from t1', - 'select floor(usmallint_col) * floor(usmallint_col) from super', - 'select floor(usmallint_col) * floor(usmallint_col) from t1', - 'select floor(utinyint_col) * floor(utinyint_col) from super', - 'select floor(utinyint_col) * floor(utinyint_col) from t1', - 'select floor(count(ts)) from super', - 'select floor(count(ts)) from t1', - 'select floor(count(timestamp_col)) from super', - 'select floor(count(timestamp_col)) from t1', - 'select floor(count(int_col)) from super', - 'select floor(count(int_col)) from t1', - 'select floor(count(bigint_col)) from super', - 'select floor(count(bigint_col)) from t1', - 'select floor(count(float_col)) from super', - 'select floor(count(float_col)) from t1', - 'select floor(count(double_col)) from super', - 'select floor(count(double_col)) from t1', - 'select floor(count(binary_col)) from super', - 'select floor(count(binary_col)) from t1', - 'select floor(count(smallint_col)) from super', - 'select floor(count(smallint_col)) from t1', - 'select floor(count(tinyint_col)) from super', - 'select floor(count(tinyint_col)) from t1', - 'select floor(count(bool_col)) from super', - 'select floor(count(bool_col)) from t1', - 'select floor(count(nchar_col)) from super', - 'select floor(count(nchar_col)) from t1', - 'select floor(count(uint_col)) from super', - 'select floor(count(uint_col)) from t1', - 'select floor(count(ubigint_col)) from super', - 'select floor(count(ubigint_col)) from t1', - 'select floor(count(usmallint_col)) from super', - 'select floor(count(usmallint_col)) from t1', - 'select floor(count(utinyint_col)) from super', - 'select floor(count(utinyint_col)) from t1', - 'select floor(count(timestamp_tag)) from super', - 'select floor(count(timestamp_tag)) from t1', - 'select floor(count(int_tag)) from super', - 'select floor(count(int_tag)) from t1', - 'select floor(count(bigint_tag)) from super', - 'select floor(count(bigint_tag)) from t1', - 'select floor(count(float_tag)) from super', - 'select floor(count(float_tag)) from t1', - 'select floor(count(double_tag)) from super', - 'select floor(count(double_tag)) from t1', - 'select floor(count(binary_tag)) from super', - 'select floor(count(binary_tag)) from t1', - 'select floor(count(smallint_tag)) from super', - 'select floor(count(smallint_tag)) from t1', - 'select floor(count(tinyint_tag)) from super', - 'select floor(count(tinyint_tag)) from t1', - 'select floor(count(bool_tag)) from super', - 'select floor(count(bool_tag)) from t1', - 'select floor(count(nchar_tag)) from super', - 'select floor(count(nchar_tag)) from t1', - 'select floor(count(uint_tag)) from super', - 'select floor(count(uint_tag)) from t1', - 'select floor(count(ubigint_tag)) from super', - 'select floor(count(ubigint_tag)) from t1', - 'select floor(count(usmallint_tag)) from super', - 'select floor(count(usmallint_tag)) from t1', - 'select floor(count(utinyint_tag)) from super', - 'select floor(count(utinyint_tag)) from t1', - 'select floor(avg(int_col)) from super', - 'select floor(avg(int_col)) from t1', - 'select floor(avg(bigint_col)) from super', - 'select floor(avg(bigint_col)) from t1', - 'select floor(avg(float_col)) from super', - 'select floor(avg(float_col)) from t1', - 'select floor(avg(double_col)) from super', - 'select floor(avg(double_col)) from t1', - 'select floor(avg(smallint_col)) from super', - 'select floor(avg(smallint_col)) from t1', - 'select floor(avg(tinyint_col)) from super', - 'select floor(avg(tinyint_col)) from t1', - 'select floor(avg(uint_col)) from super', - 'select floor(avg(uint_col)) from t1', - 'select floor(avg(ubigint_col)) from super', - 'select floor(avg(ubigint_col)) from t1', - 'select floor(avg(usmallint_col)) from super', - 'select floor(avg(usmallint_col)) from t1', - 'select floor(avg(utinyint_col)) from super', - 'select floor(avg(utinyint_col)) from t1', - 'select floor(twa(int_col)) from t1', - 'select floor(twa(bigint_col)) from t1', - 'select floor(twa(float_col)) from t1', - 'select floor(twa(double_col)) from t1', - 'select floor(twa(smallint_col)) from t1', - 'select floor(twa(tinyint_col)) from t1', - 'select floor(twa(uint_col)) from t1', - 'select floor(twa(ubigint_col)) from t1', - 'select floor(twa(usmallint_col)) from t1', - 'select floor(twa(utinyint_col)) from t1', - 'select floor(sum(int_col)) from super', - 'select floor(sum(int_col)) from t1', - 'select floor(sum(bigint_col)) from super', - 'select floor(sum(bigint_col)) from t1', - 'select floor(sum(float_col)) from super', - 'select floor(sum(float_col)) from t1', - 'select floor(sum(double_col)) from super', - 'select floor(sum(double_col)) from t1', - 'select floor(sum(smallint_col)) from super', - 'select floor(sum(smallint_col)) from t1', - 'select floor(sum(tinyint_col)) from super', - 'select floor(sum(tinyint_col)) from t1', - 'select floor(sum(uint_col)) from super', - 'select floor(sum(uint_col)) from t1', - 'select floor(sum(ubigint_col)) from super', - 'select floor(sum(ubigint_col)) from t1', - 'select floor(sum(usmallint_col)) from super', - 'select floor(sum(usmallint_col)) from t1', - 'select floor(sum(utinyint_col)) from super', - 'select floor(sum(utinyint_col)) from t1', - 'select floor(stddev(int_col)) from super', - 'select floor(stddev(int_col)) from t1', - 'select floor(stddev(bigint_col)) from super', - 'select floor(stddev(bigint_col)) from t1', - 'select floor(stddev(float_col)) from super', - 'select floor(stddev(float_col)) from t1', - 'select floor(stddev(double_col)) from super', - 'select floor(stddev(double_col)) from t1', - 'select floor(stddev(smallint_col)) from super', - 'select floor(stddev(smallint_col)) from t1', - 'select floor(stddev(tinyint_col)) from super', - 'select floor(stddev(tinyint_col)) from t1', - 'select floor(stddev(uint_col)) from super', - 'select floor(stddev(uint_col)) from t1', - 'select floor(stddev(ubigint_col)) from super', - 'select floor(stddev(ubigint_col)) from t1', - 'select floor(stddev(usmallint_col)) from super', - 'select floor(stddev(usmallint_col)) from t1', - 'select floor(stddev(utinyint_col)) from super', - 'select floor(stddev(utinyint_col)) from t1', - 'select floor(irate(int_col)) from t1', - 'select floor(irate(bigint_col)) from t1', - 'select floor(irate(float_col)) from t1', - 'select floor(irate(double_col)) from t1', - 'select floor(irate(smallint_col)) from t1', - 'select floor(irate(tinyint_col)) from t1', - 'select floor(irate(uint_col)) from t1', - 'select floor(irate(ubigint_col)) from t1', - 'select floor(irate(usmallint_col)) from t1', - 'select floor(irate(utinyint_col)) from t1', - 'select floor(min(int_col)) from super', - 'select floor(min(int_col)) from t1', - 'select floor(min(bigint_col)) from super', - 'select floor(min(bigint_col)) from t1', - 'select floor(min(float_col)) from super', - 'select floor(min(float_col)) from t1', - 'select floor(min(double_col)) from super', - 'select floor(min(double_col)) from t1', - 'select floor(min(smallint_col)) from super', - 'select floor(min(smallint_col)) from t1', - 'select floor(min(tinyint_col)) from super', - 'select floor(min(tinyint_col)) from t1', - 'select floor(min(uint_col)) from super', - 'select floor(min(uint_col)) from t1', - 'select floor(min(ubigint_col)) from super', - 'select floor(min(ubigint_col)) from t1', - 'select floor(min(usmallint_col)) from super', - 'select floor(min(usmallint_col)) from t1', - 'select floor(min(utinyint_col)) from super', - 'select floor(min(utinyint_col)) from t1', - 'select floor(max(int_col)) from super', - 'select floor(max(int_col)) from t1', - 'select floor(max(bigint_col)) from super', - 'select floor(max(bigint_col)) from t1', - 'select floor(max(float_col)) from super', - 'select floor(max(float_col)) from t1', - 'select floor(max(double_col)) from super', - 'select floor(max(double_col)) from t1', - 'select floor(max(smallint_col)) from super', - 'select floor(max(smallint_col)) from t1', - 'select floor(max(tinyint_col)) from super', - 'select floor(max(tinyint_col)) from t1', - 'select floor(max(uint_col)) from super', - 'select floor(max(uint_col)) from t1', - 'select floor(max(ubigint_col)) from super', - 'select floor(max(ubigint_col)) from t1', - 'select floor(max(usmallint_col)) from super', - 'select floor(max(usmallint_col)) from t1', - 'select floor(max(utinyint_col)) from super', - 'select floor(max(utinyint_col)) from t1', - 'select floor(first(int_col)) from super', - 'select floor(first(int_col)) from t1', - 'select floor(first(bigint_col)) from super', - 'select floor(first(bigint_col)) from t1', - 'select floor(first(float_col)) from super', - 'select floor(first(float_col)) from t1', - 'select floor(first(double_col)) from super', - 'select floor(first(double_col)) from t1', - 'select floor(first(smallint_col)) from super', - 'select floor(first(smallint_col)) from t1', - 'select floor(first(tinyint_col)) from super', - 'select floor(first(tinyint_col)) from t1', - 'select floor(first(uint_col)) from super', - 'select floor(first(uint_col)) from t1', - 'select floor(first(ubigint_col)) from super', - 'select floor(first(ubigint_col)) from t1', - 'select floor(first(usmallint_col)) from super', - 'select floor(first(usmallint_col)) from t1', - 'select floor(first(utinyint_col)) from super', - 'select floor(first(utinyint_col)) from t1', - 'select floor(last(int_col)) from super', - 'select floor(last(int_col)) from t1', - 'select floor(last(bigint_col)) from super', - 'select floor(last(bigint_col)) from t1', - 'select floor(last(float_col)) from super', - 'select floor(last(float_col)) from t1', - 'select floor(last(double_col)) from super', - 'select floor(last(double_col)) from t1', - 'select floor(last(smallint_col)) from super', - 'select floor(last(smallint_col)) from t1', - 'select floor(last(tinyint_col)) from super', - 'select floor(last(tinyint_col)) from t1', - 'select floor(last(uint_col)) from super', - 'select floor(last(uint_col)) from t1', - 'select floor(last(ubigint_col)) from super', - 'select floor(last(ubigint_col)) from t1', - 'select floor(last(usmallint_col)) from super', - 'select floor(last(usmallint_col)) from t1', - 'select floor(last(utinyint_col)) from super', - 'select floor(last(utinyint_col)) from t1', - 'select floor(percentile(int_col, 1)) from t1', - 'select floor(percentile(bigint_col, 1)) from t1', - 'select floor(percentile(float_col, 1)) from t1', - 'select floor(percentile(double_col, 1)) from t1', - 'select floor(percentile(smallint_col, 1)) from t1', - 'select floor(percentile(tinyint_col, 1)) from t1', - 'select floor(percentile(uint_col, 1)) from t1', - 'select floor(percentile(ubigint_col, 1)) from t1', - 'select floor(percentile(usmallint_col, 1)) from t1', - 'select floor(percentile(utinyint_col, 1)) from t1', - 'select floor(apercentile(int_col, 1)) from super', - 'select floor(apercentile(int_col, 1)) from t1', - 'select floor(apercentile(bigint_col, 1)) from super', - 'select floor(apercentile(bigint_col, 1)) from t1', - 'select floor(apercentile(float_col, 1)) from super', - 'select floor(apercentile(float_col, 1)) from t1', - 'select floor(apercentile(double_col, 1)) from super', - 'select floor(apercentile(double_col, 1)) from t1', - 'select floor(apercentile(smallint_col, 1)) from super', - 'select floor(apercentile(smallint_col, 1)) from t1', - 'select floor(apercentile(tinyint_col, 1)) from super', - 'select floor(apercentile(tinyint_col, 1)) from t1', - 'select floor(apercentile(uint_col, 1)) from super', - 'select floor(apercentile(uint_col, 1)) from t1', - 'select floor(apercentile(ubigint_col, 1)) from super', - 'select floor(apercentile(ubigint_col, 1)) from t1', - 'select floor(apercentile(usmallint_col, 1)) from super', - 'select floor(apercentile(usmallint_col, 1)) from t1', - 'select floor(apercentile(utinyint_col, 1)) from super', - 'select floor(apercentile(utinyint_col, 1)) from t1', - 'select floor(last_row(int_col)) from super', - 'select floor(last_row(int_col)) from t1', - 'select floor(last_row(bigint_col)) from super', - 'select floor(last_row(bigint_col)) from t1', - 'select floor(last_row(float_col)) from super', - 'select floor(last_row(float_col)) from t1', - 'select floor(last_row(double_col)) from super', - 'select floor(last_row(double_col)) from t1', - 'select floor(last_row(smallint_col)) from super', - 'select floor(last_row(smallint_col)) from t1', - 'select floor(last_row(tinyint_col)) from super', - 'select floor(last_row(tinyint_col)) from t1', - 'select floor(last_row(uint_col)) from super', - 'select floor(last_row(uint_col)) from t1', - 'select floor(last_row(ubigint_col)) from super', - 'select floor(last_row(ubigint_col)) from t1', - 'select floor(last_row(usmallint_col)) from super', - 'select floor(last_row(usmallint_col)) from t1', - 'select floor(last_row(utinyint_col)) from super', - 'select floor(last_row(utinyint_col)) from t1', - 'select floor(spread(ts)) from super', - 'select floor(spread(ts)) from t1', - 'select floor(spread(timestamp_col)) from super', - 'select floor(spread(timestamp_col)) from t1', - 'select floor(spread(int_col)) from super', - 'select floor(spread(int_col)) from t1', - 'select floor(spread(bigint_col)) from super', - 'select floor(spread(bigint_col)) from t1', - 'select floor(spread(float_col)) from super', - 'select floor(spread(float_col)) from t1', - 'select floor(spread(double_col)) from super', - 'select floor(spread(double_col)) from t1', - 'select floor(spread(smallint_col)) from super', - 'select floor(spread(smallint_col)) from t1', - 'select floor(spread(tinyint_col)) from super', - 'select floor(spread(tinyint_col)) from t1', - 'select floor(spread(uint_col)) from super', - 'select floor(spread(uint_col)) from t1', - 'select floor(spread(ubigint_col)) from super', - 'select floor(spread(ubigint_col)) from t1', - 'select floor(spread(usmallint_col)) from super', - 'select floor(spread(usmallint_col)) from t1', - 'select floor(spread(utinyint_col)) from super', - 'select floor(spread(utinyint_col)) from t1', - 'select floor(int_col + int_col) from super', - 'select floor(int_col + int_col) from t1', - 'select floor(bigint_col + bigint_col) from super', - 'select floor(bigint_col + bigint_col) from t1', - 'select floor(float_col + float_col) from super', - 'select floor(float_col + float_col) from t1', - 'select floor(double_col + double_col) from super', - 'select floor(double_col + double_col) from t1', - 'select floor(smallint_col + smallint_col) from super', - 'select floor(smallint_col + smallint_col) from t1', - 'select floor(tinyint_col + tinyint_col) from super', - 'select floor(tinyint_col + tinyint_col) from t1', - 'select floor(uint_col + uint_col) from super', - 'select floor(uint_col + uint_col) from t1', - 'select floor(ubigint_col + ubigint_col) from super', - 'select floor(ubigint_col + ubigint_col) from t1', - 'select floor(usmallint_col + usmallint_col) from super', - 'select floor(usmallint_col + usmallint_col) from t1', - 'select floor(utinyint_col + utinyint_col) from super', - 'select floor(utinyint_col + utinyint_col) from t1', - 'select floor(int_col - int_col) from super', - 'select floor(int_col - int_col) from t1', - 'select floor(bigint_col - bigint_col) from super', - 'select floor(bigint_col - bigint_col) from t1', - 'select floor(float_col - float_col) from super', - 'select floor(float_col - float_col) from t1', - 'select floor(double_col - double_col) from super', - 'select floor(double_col - double_col) from t1', - 'select floor(smallint_col - smallint_col) from super', - 'select floor(smallint_col - smallint_col) from t1', - 'select floor(tinyint_col - tinyint_col) from super', - 'select floor(tinyint_col - tinyint_col) from t1', - 'select floor(uint_col - uint_col) from super', - 'select floor(uint_col - uint_col) from t1', - 'select floor(ubigint_col - ubigint_col) from super', - 'select floor(ubigint_col - ubigint_col) from t1', - 'select floor(usmallint_col - usmallint_col) from super', - 'select floor(usmallint_col - usmallint_col) from t1', - 'select floor(utinyint_col - utinyint_col) from super', - 'select floor(utinyint_col - utinyint_col) from t1', - 'select floor(int_col * int_col) from super', - 'select floor(int_col * int_col) from t1', - 'select floor(bigint_col * bigint_col) from super', - 'select floor(bigint_col * bigint_col) from t1', - 'select floor(float_col * float_col) from super', - 'select floor(float_col * float_col) from t1', - 'select floor(double_col * double_col) from super', - 'select floor(double_col * double_col) from t1', - 'select floor(smallint_col * smallint_col) from super', - 'select floor(smallint_col * smallint_col) from t1', - 'select floor(tinyint_col * tinyint_col) from super', - 'select floor(tinyint_col * tinyint_col) from t1', - 'select floor(uint_col * uint_col) from super', - 'select floor(uint_col * uint_col) from t1', - 'select floor(ubigint_col * ubigint_col) from super', - 'select floor(ubigint_col * ubigint_col) from t1', - 'select floor(usmallint_col * usmallint_col) from super', - 'select floor(usmallint_col * usmallint_col) from t1', - 'select floor(utinyint_col * utinyint_col) from super', - 'select floor(utinyint_col * utinyint_col) from t1', - 'select floor(int_col / int_col) from super', - 'select floor(int_col / int_col) from t1', - 'select floor(bigint_col / bigint_col) from super', - 'select floor(bigint_col / bigint_col) from t1', - 'select floor(float_col / float_col) from super', - 'select floor(float_col / float_col) from t1', - 'select floor(double_col / double_col) from super', - 'select floor(double_col / double_col) from t1', - 'select floor(smallint_col / smallint_col) from super', - 'select floor(smallint_col / smallint_col) from t1', - 'select floor(tinyint_col / tinyint_col) from super', - 'select floor(tinyint_col / tinyint_col) from t1', - 'select floor(uint_col / uint_col) from super', - 'select floor(uint_col / uint_col) from t1', - 'select floor(ubigint_col / ubigint_col) from super', - 'select floor(ubigint_col / ubigint_col) from t1', - 'select floor(usmallint_col / usmallint_col) from super', - 'select floor(usmallint_col / usmallint_col) from t1', - 'select floor(utinyint_col / utinyint_col) from super', - 'select floor(utinyint_col / utinyint_col) from t1', - 'select int_col, floor(int_col), int_col from super', - 'select int_col, floor(int_col), int_col from t1', - 'select bigint_col, floor(bigint_col), bigint_col from super', - 'select bigint_col, floor(bigint_col), bigint_col from t1', - 'select float_col, floor(float_col), float_col from super', - 'select float_col, floor(float_col), float_col from t1', - 'select double_col, floor(double_col), double_col from super', - 'select double_col, floor(double_col), double_col from t1', - 'select smallint_col, floor(smallint_col), smallint_col from super', - 'select smallint_col, floor(smallint_col), smallint_col from t1', - 'select tinyint_col, floor(tinyint_col), tinyint_col from super', - 'select tinyint_col, floor(tinyint_col), tinyint_col from t1', - 'select uint_col, floor(uint_col), uint_col from super', - 'select uint_col, floor(uint_col), uint_col from t1', - 'select ubigint_col, floor(ubigint_col), ubigint_col from super', - 'select ubigint_col, floor(ubigint_col), ubigint_col from t1', - 'select usmallint_col, floor(usmallint_col), usmallint_col from super', - 'select usmallint_col, floor(usmallint_col), usmallint_col from t1', - 'select utinyint_col, floor(utinyint_col), utinyint_col from super', - 'select utinyint_col, floor(utinyint_col), utinyint_col from t1', - 'select 1, floor(int_col), 1 from super', - 'select 1, floor(int_col), 1 from t1', - 'select 1, floor(bigint_col), 1 from super', - 'select 1, floor(bigint_col), 1 from t1', - 'select 1, floor(float_col), 1 from super', - 'select 1, floor(float_col), 1 from t1', - 'select 1, floor(double_col), 1 from super', - 'select 1, floor(double_col), 1 from t1', - 'select 1, floor(smallint_col), 1 from super', - 'select 1, floor(smallint_col), 1 from t1', - 'select 1, floor(tinyint_col), 1 from super', - 'select 1, floor(tinyint_col), 1 from t1', - 'select 1, floor(uint_col), 1 from super', - 'select 1, floor(uint_col), 1 from t1', - 'select 1, floor(ubigint_col), 1 from super', - 'select 1, floor(ubigint_col), 1 from t1', - 'select 1, floor(usmallint_col), 1 from super', - 'select 1, floor(usmallint_col), 1 from t1', - 'select 1, floor(utinyint_col), 1 from super', - 'select 1, floor(utinyint_col), 1 from t1', - 'select floor(int_col) as anyName from super', - 'select floor(int_col) as anyName from t1', - 'select floor(bigint_col) as anyName from super', - 'select floor(bigint_col) as anyName from t1', - 'select floor(float_col) as anyName from super', - 'select floor(float_col) as anyName from t1', - 'select floor(double_col) as anyName from super', - 'select floor(double_col) as anyName from t1', - 'select floor(smallint_col) as anyName from super', - 'select floor(smallint_col) as anyName from t1', - 'select floor(tinyint_col) as anyName from super', - 'select floor(tinyint_col) as anyName from t1', - 'select floor(uint_col) as anyName from super', - 'select floor(uint_col) as anyName from t1', - 'select floor(ubigint_col) as anyName from super', - 'select floor(ubigint_col) as anyName from t1', - 'select floor(usmallint_col) as anyName from super', - 'select floor(usmallint_col) as anyName from t1', - 'select floor(utinyint_col) as anyName from super', - 'select floor(utinyint_col) as anyName from t1'] + 'select floor(int_col) from t1', + 'select floor(bigint_col) from super', + 'select floor(bigint_col) from t1', + 'select floor(float_col) from super', + 'select floor(float_col) from t1', + 'select floor(double_col) from super', + 'select floor(double_col) from t1', + 'select floor(smallint_col) from super', + 'select floor(smallint_col) from t1', + 'select floor(tinyint_col) from super', + 'select floor(tinyint_col) from t1', + 'select floor(uint_col) from super', + 'select floor(uint_col) from t1', + 'select floor(ubigint_col) from super', + 'select floor(ubigint_col) from t1', + 'select floor(usmallint_col) from super', + 'select floor(usmallint_col) from t1', + 'select floor(utinyint_col) from super', + 'select floor(utinyint_col) from t1', + 'select floor(int_col) - floor(int_col) from super', + 'select floor(int_col) - floor(int_col) from t1', + 'select floor(bigint_col) - floor(bigint_col) from super', + 'select floor(bigint_col) - floor(bigint_col) from t1', + 'select floor(float_col) - floor(float_col) from super', + 'select floor(float_col) - floor(float_col) from t1', + 'select floor(double_col) - floor(double_col) from super', + 'select floor(double_col) - floor(double_col) from t1', + 'select floor(smallint_col) - floor(smallint_col) from super', + 'select floor(smallint_col) - floor(smallint_col) from t1', + 'select floor(tinyint_col) - floor(tinyint_col) from super', + 'select floor(tinyint_col) - floor(tinyint_col) from t1', + 'select floor(uint_col) - floor(uint_col) from super', + 'select floor(uint_col) - floor(uint_col) from t1', + 'select floor(ubigint_col) - floor(ubigint_col) from super', + 'select floor(ubigint_col) - floor(ubigint_col) from t1', + 'select floor(usmallint_col) - floor(usmallint_col) from super', + 'select floor(usmallint_col) - floor(usmallint_col) from t1', + 'select floor(utinyint_col) - floor(utinyint_col) from super', + 'select floor(utinyint_col) - floor(utinyint_col) from t1', + 'select floor(int_col) / floor(int_col) from super', + 'select floor(int_col) / floor(int_col) from t1', + 'select floor(bigint_col) / floor(bigint_col) from super', + 'select floor(bigint_col) / floor(bigint_col) from t1', + 'select floor(float_col) / floor(float_col) from super', + 'select floor(float_col) / floor(float_col) from t1', + 'select floor(double_col) / floor(double_col) from super', + 'select floor(double_col) / floor(double_col) from t1', + 'select floor(smallint_col) / floor(smallint_col) from super', + 'select floor(smallint_col) / floor(smallint_col) from t1', + 'select floor(tinyint_col) / floor(tinyint_col) from super', + 'select floor(tinyint_col) / floor(tinyint_col) from t1', + 'select floor(uint_col) / floor(uint_col) from super', + 'select floor(uint_col) / floor(uint_col) from t1', + 'select floor(ubigint_col) / floor(ubigint_col) from super', + 'select floor(ubigint_col) / floor(ubigint_col) from t1', + 'select floor(usmallint_col) / floor(usmallint_col) from super', + 'select floor(usmallint_col) / floor(usmallint_col) from t1', + 'select floor(utinyint_col) / floor(utinyint_col) from super', + 'select floor(utinyint_col) / floor(utinyint_col) from t1', + 'select floor(int_col) * floor(int_col) from super', + 'select floor(int_col) * floor(int_col) from t1', + 'select floor(bigint_col) * floor(bigint_col) from super', + 'select floor(bigint_col) * floor(bigint_col) from t1', + 'select floor(float_col) * floor(float_col) from super', + 'select floor(float_col) * floor(float_col) from t1', + 'select floor(double_col) * floor(double_col) from super', + 'select floor(double_col) * floor(double_col) from t1', + 'select floor(smallint_col) * floor(smallint_col) from super', + 'select floor(smallint_col) * floor(smallint_col) from t1', + 'select floor(tinyint_col) * floor(tinyint_col) from super', + 'select floor(tinyint_col) * floor(tinyint_col) from t1', + 'select floor(uint_col) * floor(uint_col) from super', + 'select floor(uint_col) * floor(uint_col) from t1', + 'select floor(ubigint_col) * floor(ubigint_col) from super', + 'select floor(ubigint_col) * floor(ubigint_col) from t1', + 'select floor(usmallint_col) * floor(usmallint_col) from super', + 'select floor(usmallint_col) * floor(usmallint_col) from t1', + 'select floor(utinyint_col) * floor(utinyint_col) from super', + 'select floor(utinyint_col) * floor(utinyint_col) from t1', + 'select floor(count(ts)) from super', + 'select floor(count(ts)) from t1', + 'select floor(count(timestamp_col)) from super', + 'select floor(count(timestamp_col)) from t1', + 'select floor(count(int_col)) from super', + 'select floor(count(int_col)) from t1', + 'select floor(count(bigint_col)) from super', + 'select floor(count(bigint_col)) from t1', + 'select floor(count(float_col)) from super', + 'select floor(count(float_col)) from t1', + 'select floor(count(double_col)) from super', + 'select floor(count(double_col)) from t1', + 'select floor(count(binary_col)) from super', + 'select floor(count(binary_col)) from t1', + 'select floor(count(smallint_col)) from super', + 'select floor(count(smallint_col)) from t1', + 'select floor(count(tinyint_col)) from super', + 'select floor(count(tinyint_col)) from t1', + 'select floor(count(bool_col)) from super', + 'select floor(count(bool_col)) from t1', + 'select floor(count(nchar_col)) from super', + 'select floor(count(nchar_col)) from t1', + 'select floor(count(uint_col)) from super', + 'select floor(count(uint_col)) from t1', + 'select floor(count(ubigint_col)) from super', + 'select floor(count(ubigint_col)) from t1', + 'select floor(count(usmallint_col)) from super', + 'select floor(count(usmallint_col)) from t1', + 'select floor(count(utinyint_col)) from super', + 'select floor(count(utinyint_col)) from t1', + 'select floor(count(timestamp_tag)) from super', + 'select floor(count(timestamp_tag)) from t1', + 'select floor(count(int_tag)) from super', + 'select floor(count(int_tag)) from t1', + 'select floor(count(bigint_tag)) from super', + 'select floor(count(bigint_tag)) from t1', + 'select floor(count(float_tag)) from super', + 'select floor(count(float_tag)) from t1', + 'select floor(count(double_tag)) from super', + 'select floor(count(double_tag)) from t1', + 'select floor(count(binary_tag)) from super', + 'select floor(count(binary_tag)) from t1', + 'select floor(count(smallint_tag)) from super', + 'select floor(count(smallint_tag)) from t1', + 'select floor(count(tinyint_tag)) from super', + 'select floor(count(tinyint_tag)) from t1', + 'select floor(count(bool_tag)) from super', + 'select floor(count(bool_tag)) from t1', + 'select floor(count(nchar_tag)) from super', + 'select floor(count(nchar_tag)) from t1', + 'select floor(count(uint_tag)) from super', + 'select floor(count(uint_tag)) from t1', + 'select floor(count(ubigint_tag)) from super', + 'select floor(count(ubigint_tag)) from t1', + 'select floor(count(usmallint_tag)) from super', + 'select floor(count(usmallint_tag)) from t1', + 'select floor(count(utinyint_tag)) from super', + 'select floor(count(utinyint_tag)) from t1', + 'select floor(avg(int_col)) from super', + 'select floor(avg(int_col)) from t1', + 'select floor(avg(bigint_col)) from super', + 'select floor(avg(bigint_col)) from t1', + 'select floor(avg(float_col)) from super', + 'select floor(avg(float_col)) from t1', + 'select floor(avg(double_col)) from super', + 'select floor(avg(double_col)) from t1', + 'select floor(avg(smallint_col)) from super', + 'select floor(avg(smallint_col)) from t1', + 'select floor(avg(tinyint_col)) from super', + 'select floor(avg(tinyint_col)) from t1', + 'select floor(avg(uint_col)) from super', + 'select floor(avg(uint_col)) from t1', + 'select floor(avg(ubigint_col)) from super', + 'select floor(avg(ubigint_col)) from t1', + 'select floor(avg(usmallint_col)) from super', + 'select floor(avg(usmallint_col)) from t1', + 'select floor(avg(utinyint_col)) from super', + 'select floor(avg(utinyint_col)) from t1', + 'select floor(twa(int_col)) from t1', + 'select floor(twa(bigint_col)) from t1', + 'select floor(twa(float_col)) from t1', + 'select floor(twa(double_col)) from t1', + 'select floor(twa(smallint_col)) from t1', + 'select floor(twa(tinyint_col)) from t1', + 'select floor(twa(uint_col)) from t1', + 'select floor(twa(ubigint_col)) from t1', + 'select floor(twa(usmallint_col)) from t1', + 'select floor(twa(utinyint_col)) from t1', + 'select floor(sum(int_col)) from super', + 'select floor(sum(int_col)) from t1', + 'select floor(sum(bigint_col)) from super', + 'select floor(sum(bigint_col)) from t1', + 'select floor(sum(float_col)) from super', + 'select floor(sum(float_col)) from t1', + 'select floor(sum(double_col)) from super', + 'select floor(sum(double_col)) from t1', + 'select floor(sum(smallint_col)) from super', + 'select floor(sum(smallint_col)) from t1', + 'select floor(sum(tinyint_col)) from super', + 'select floor(sum(tinyint_col)) from t1', + 'select floor(sum(uint_col)) from super', + 'select floor(sum(uint_col)) from t1', + 'select floor(sum(ubigint_col)) from super', + 'select floor(sum(ubigint_col)) from t1', + 'select floor(sum(usmallint_col)) from super', + 'select floor(sum(usmallint_col)) from t1', + 'select floor(sum(utinyint_col)) from super', + 'select floor(sum(utinyint_col)) from t1', + 'select floor(stddev(int_col)) from super', + 'select floor(stddev(int_col)) from t1', + 'select floor(stddev(bigint_col)) from super', + 'select floor(stddev(bigint_col)) from t1', + 'select floor(stddev(float_col)) from super', + 'select floor(stddev(float_col)) from t1', + 'select floor(stddev(double_col)) from super', + 'select floor(stddev(double_col)) from t1', + 'select floor(stddev(smallint_col)) from super', + 'select floor(stddev(smallint_col)) from t1', + 'select floor(stddev(tinyint_col)) from super', + 'select floor(stddev(tinyint_col)) from t1', + 'select floor(stddev(uint_col)) from super', + 'select floor(stddev(uint_col)) from t1', + 'select floor(stddev(ubigint_col)) from super', + 'select floor(stddev(ubigint_col)) from t1', + 'select floor(stddev(usmallint_col)) from super', + 'select floor(stddev(usmallint_col)) from t1', + 'select floor(stddev(utinyint_col)) from super', + 'select floor(stddev(utinyint_col)) from t1', + 'select floor(irate(int_col)) from t1', + 'select floor(irate(bigint_col)) from t1', + 'select floor(irate(float_col)) from t1', + 'select floor(irate(double_col)) from t1', + 'select floor(irate(smallint_col)) from t1', + 'select floor(irate(tinyint_col)) from t1', + 'select floor(irate(uint_col)) from t1', + 'select floor(irate(ubigint_col)) from t1', + 'select floor(irate(usmallint_col)) from t1', + 'select floor(irate(utinyint_col)) from t1', + 'select floor(min(int_col)) from super', + 'select floor(min(int_col)) from t1', + 'select floor(min(bigint_col)) from super', + 'select floor(min(bigint_col)) from t1', + 'select floor(min(float_col)) from super', + 'select floor(min(float_col)) from t1', + 'select floor(min(double_col)) from super', + 'select floor(min(double_col)) from t1', + 'select floor(min(smallint_col)) from super', + 'select floor(min(smallint_col)) from t1', + 'select floor(min(tinyint_col)) from super', + 'select floor(min(tinyint_col)) from t1', + 'select floor(min(uint_col)) from super', + 'select floor(min(uint_col)) from t1', + 'select floor(min(ubigint_col)) from super', + 'select floor(min(ubigint_col)) from t1', + 'select floor(min(usmallint_col)) from super', + 'select floor(min(usmallint_col)) from t1', + 'select floor(min(utinyint_col)) from super', + 'select floor(min(utinyint_col)) from t1', + 'select floor(max(int_col)) from super', + 'select floor(max(int_col)) from t1', + 'select floor(max(bigint_col)) from super', + 'select floor(max(bigint_col)) from t1', + 'select floor(max(float_col)) from super', + 'select floor(max(float_col)) from t1', + 'select floor(max(double_col)) from super', + 'select floor(max(double_col)) from t1', + 'select floor(max(smallint_col)) from super', + 'select floor(max(smallint_col)) from t1', + 'select floor(max(tinyint_col)) from super', + 'select floor(max(tinyint_col)) from t1', + 'select floor(max(uint_col)) from super', + 'select floor(max(uint_col)) from t1', + 'select floor(max(ubigint_col)) from super', + 'select floor(max(ubigint_col)) from t1', + 'select floor(max(usmallint_col)) from super', + 'select floor(max(usmallint_col)) from t1', + 'select floor(max(utinyint_col)) from super', + 'select floor(max(utinyint_col)) from t1', + 'select floor(first(int_col)) from super', + 'select floor(first(int_col)) from t1', + 'select floor(first(bigint_col)) from super', + 'select floor(first(bigint_col)) from t1', + 'select floor(first(float_col)) from super', + 'select floor(first(float_col)) from t1', + 'select floor(first(double_col)) from super', + 'select floor(first(double_col)) from t1', + 'select floor(first(smallint_col)) from super', + 'select floor(first(smallint_col)) from t1', + 'select floor(first(tinyint_col)) from super', + 'select floor(first(tinyint_col)) from t1', + 'select floor(first(uint_col)) from super', + 'select floor(first(uint_col)) from t1', + 'select floor(first(ubigint_col)) from super', + 'select floor(first(ubigint_col)) from t1', + 'select floor(first(usmallint_col)) from super', + 'select floor(first(usmallint_col)) from t1', + 'select floor(first(utinyint_col)) from super', + 'select floor(first(utinyint_col)) from t1', + 'select floor(last(int_col)) from super', + 'select floor(last(int_col)) from t1', + 'select floor(last(bigint_col)) from super', + 'select floor(last(bigint_col)) from t1', + 'select floor(last(float_col)) from super', + 'select floor(last(float_col)) from t1', + 'select floor(last(double_col)) from super', + 'select floor(last(double_col)) from t1', + 'select floor(last(smallint_col)) from super', + 'select floor(last(smallint_col)) from t1', + 'select floor(last(tinyint_col)) from super', + 'select floor(last(tinyint_col)) from t1', + 'select floor(last(uint_col)) from super', + 'select floor(last(uint_col)) from t1', + 'select floor(last(ubigint_col)) from super', + 'select floor(last(ubigint_col)) from t1', + 'select floor(last(usmallint_col)) from super', + 'select floor(last(usmallint_col)) from t1', + 'select floor(last(utinyint_col)) from super', + 'select floor(last(utinyint_col)) from t1', + 'select floor(percentile(int_col, 1)) from t1', + 'select floor(percentile(bigint_col, 1)) from t1', + 'select floor(percentile(float_col, 1)) from t1', + 'select floor(percentile(double_col, 1)) from t1', + 'select floor(percentile(smallint_col, 1)) from t1', + 'select floor(percentile(tinyint_col, 1)) from t1', + 'select floor(percentile(uint_col, 1)) from t1', + 'select floor(percentile(ubigint_col, 1)) from t1', + 'select floor(percentile(usmallint_col, 1)) from t1', + 'select floor(percentile(utinyint_col, 1)) from t1', + 'select floor(apercentile(int_col, 1)) from super', + 'select floor(apercentile(int_col, 1)) from t1', + 'select floor(apercentile(bigint_col, 1)) from super', + 'select floor(apercentile(bigint_col, 1)) from t1', + 'select floor(apercentile(float_col, 1)) from super', + 'select floor(apercentile(float_col, 1)) from t1', + 'select floor(apercentile(double_col, 1)) from super', + 'select floor(apercentile(double_col, 1)) from t1', + 'select floor(apercentile(smallint_col, 1)) from super', + 'select floor(apercentile(smallint_col, 1)) from t1', + 'select floor(apercentile(tinyint_col, 1)) from super', + 'select floor(apercentile(tinyint_col, 1)) from t1', + 'select floor(apercentile(uint_col, 1)) from super', + 'select floor(apercentile(uint_col, 1)) from t1', + 'select floor(apercentile(ubigint_col, 1)) from super', + 'select floor(apercentile(ubigint_col, 1)) from t1', + 'select floor(apercentile(usmallint_col, 1)) from super', + 'select floor(apercentile(usmallint_col, 1)) from t1', + 'select floor(apercentile(utinyint_col, 1)) from super', + 'select floor(apercentile(utinyint_col, 1)) from t1', + 'select floor(last_row(int_col)) from super', + 'select floor(last_row(int_col)) from t1', + 'select floor(last_row(bigint_col)) from super', + 'select floor(last_row(bigint_col)) from t1', + 'select floor(last_row(float_col)) from super', + 'select floor(last_row(float_col)) from t1', + 'select floor(last_row(double_col)) from super', + 'select floor(last_row(double_col)) from t1', + 'select floor(last_row(smallint_col)) from super', + 'select floor(last_row(smallint_col)) from t1', + 'select floor(last_row(tinyint_col)) from super', + 'select floor(last_row(tinyint_col)) from t1', + 'select floor(last_row(uint_col)) from super', + 'select floor(last_row(uint_col)) from t1', + 'select floor(last_row(ubigint_col)) from super', + 'select floor(last_row(ubigint_col)) from t1', + 'select floor(last_row(usmallint_col)) from super', + 'select floor(last_row(usmallint_col)) from t1', + 'select floor(last_row(utinyint_col)) from super', + 'select floor(last_row(utinyint_col)) from t1', + 'select floor(interp(int_col)) from t1', + 'select floor(interp(bigint_col)) from t1', + 'select floor(interp(float_col)) from t1', + 'select floor(interp(double_col)) from t1', + 'select floor(interp(smallint_col)) from t1', + 'select floor(interp(tinyint_col)) from t1', + 'select floor(interp(uint_col)) from t1', + 'select floor(interp(ubigint_col)) from t1', + 'select floor(interp(usmallint_col)) from t1', + 'select floor(interp(utinyint_col)) from t1', + 'select floor(spread(ts)) from super', + 'select floor(spread(ts)) from t1', + 'select floor(spread(timestamp_col)) from super', + 'select floor(spread(timestamp_col)) from t1', + 'select floor(spread(int_col)) from super', + 'select floor(spread(int_col)) from t1', + 'select floor(spread(bigint_col)) from super', + 'select floor(spread(bigint_col)) from t1', + 'select floor(spread(float_col)) from super', + 'select floor(spread(float_col)) from t1', + 'select floor(spread(double_col)) from super', + 'select floor(spread(double_col)) from t1', + 'select floor(spread(smallint_col)) from super', + 'select floor(spread(smallint_col)) from t1', + 'select floor(spread(tinyint_col)) from super', + 'select floor(spread(tinyint_col)) from t1', + 'select floor(spread(uint_col)) from super', + 'select floor(spread(uint_col)) from t1', + 'select floor(spread(ubigint_col)) from super', + 'select floor(spread(ubigint_col)) from t1', + 'select floor(spread(usmallint_col)) from super', + 'select floor(spread(usmallint_col)) from t1', + 'select floor(spread(utinyint_col)) from super', + 'select floor(spread(utinyint_col)) from t1', + 'select floor(int_col + int_col) from super', + 'select floor(int_col + int_col) from t1', + 'select floor(bigint_col + bigint_col) from super', + 'select floor(bigint_col + bigint_col) from t1', + 'select floor(float_col + float_col) from super', + 'select floor(float_col + float_col) from t1', + 'select floor(double_col + double_col) from super', + 'select floor(double_col + double_col) from t1', + 'select floor(smallint_col + smallint_col) from super', + 'select floor(smallint_col + smallint_col) from t1', + 'select floor(tinyint_col + tinyint_col) from super', + 'select floor(tinyint_col + tinyint_col) from t1', + 'select floor(uint_col + uint_col) from super', + 'select floor(uint_col + uint_col) from t1', + 'select floor(ubigint_col + ubigint_col) from super', + 'select floor(ubigint_col + ubigint_col) from t1', + 'select floor(usmallint_col + usmallint_col) from super', + 'select floor(usmallint_col + usmallint_col) from t1', + 'select floor(utinyint_col + utinyint_col) from super', + 'select floor(utinyint_col + utinyint_col) from t1', + 'select floor(int_col - int_col) from super', + 'select floor(int_col - int_col) from t1', + 'select floor(bigint_col - bigint_col) from super', + 'select floor(bigint_col - bigint_col) from t1', + 'select floor(float_col - float_col) from super', + 'select floor(float_col - float_col) from t1', + 'select floor(double_col - double_col) from super', + 'select floor(double_col - double_col) from t1', + 'select floor(smallint_col - smallint_col) from super', + 'select floor(smallint_col - smallint_col) from t1', + 'select floor(tinyint_col - tinyint_col) from super', + 'select floor(tinyint_col - tinyint_col) from t1', + 'select floor(uint_col - uint_col) from super', + 'select floor(uint_col - uint_col) from t1', + 'select floor(ubigint_col - ubigint_col) from super', + 'select floor(ubigint_col - ubigint_col) from t1', + 'select floor(usmallint_col - usmallint_col) from super', + 'select floor(usmallint_col - usmallint_col) from t1', + 'select floor(utinyint_col - utinyint_col) from super', + 'select floor(utinyint_col - utinyint_col) from t1', + 'select floor(int_col * int_col) from super', + 'select floor(int_col * int_col) from t1', + 'select floor(bigint_col * bigint_col) from super', + 'select floor(bigint_col * bigint_col) from t1', + 'select floor(float_col * float_col) from super', + 'select floor(float_col * float_col) from t1', + 'select floor(double_col * double_col) from super', + 'select floor(double_col * double_col) from t1', + 'select floor(smallint_col * smallint_col) from super', + 'select floor(smallint_col * smallint_col) from t1', + 'select floor(tinyint_col * tinyint_col) from super', + 'select floor(tinyint_col * tinyint_col) from t1', + 'select floor(uint_col * uint_col) from super', + 'select floor(uint_col * uint_col) from t1', + 'select floor(ubigint_col * ubigint_col) from super', + 'select floor(ubigint_col * ubigint_col) from t1', + 'select floor(usmallint_col * usmallint_col) from super', + 'select floor(usmallint_col * usmallint_col) from t1', + 'select floor(utinyint_col * utinyint_col) from super', + 'select floor(utinyint_col * utinyint_col) from t1', + 'select floor(int_col / int_col) from super', + 'select floor(int_col / int_col) from t1', + 'select floor(bigint_col / bigint_col) from super', + 'select floor(bigint_col / bigint_col) from t1', + 'select floor(float_col / float_col) from super', + 'select floor(float_col / float_col) from t1', + 'select floor(double_col / double_col) from super', + 'select floor(double_col / double_col) from t1', + 'select floor(smallint_col / smallint_col) from super', + 'select floor(smallint_col / smallint_col) from t1', + 'select floor(tinyint_col / tinyint_col) from super', + 'select floor(tinyint_col / tinyint_col) from t1', + 'select floor(uint_col / uint_col) from super', + 'select floor(uint_col / uint_col) from t1', + 'select floor(ubigint_col / ubigint_col) from super', + 'select floor(ubigint_col / ubigint_col) from t1', + 'select floor(usmallint_col / usmallint_col) from super', + 'select floor(usmallint_col / usmallint_col) from t1', + 'select floor(utinyint_col / utinyint_col) from super', + 'select floor(utinyint_col / utinyint_col) from t1', + 'select int_col, floor(int_col), int_col from super', + 'select int_col, floor(int_col), int_col from t1', + 'select bigint_col, floor(bigint_col), bigint_col from super', + 'select bigint_col, floor(bigint_col), bigint_col from t1', + 'select float_col, floor(float_col), float_col from super', + 'select float_col, floor(float_col), float_col from t1', + 'select double_col, floor(double_col), double_col from super', + 'select double_col, floor(double_col), double_col from t1', + 'select smallint_col, floor(smallint_col), smallint_col from super', + 'select smallint_col, floor(smallint_col), smallint_col from t1', + 'select tinyint_col, floor(tinyint_col), tinyint_col from super', + 'select tinyint_col, floor(tinyint_col), tinyint_col from t1', + 'select uint_col, floor(uint_col), uint_col from super', + 'select uint_col, floor(uint_col), uint_col from t1', + 'select ubigint_col, floor(ubigint_col), ubigint_col from super', + 'select ubigint_col, floor(ubigint_col), ubigint_col from t1', + 'select usmallint_col, floor(usmallint_col), usmallint_col from super', + 'select usmallint_col, floor(usmallint_col), usmallint_col from t1', + 'select utinyint_col, floor(utinyint_col), utinyint_col from super', + 'select utinyint_col, floor(utinyint_col), utinyint_col from t1', + 'select 1, floor(int_col), 1 from super', + 'select 1, floor(int_col), 1 from t1', + 'select 1, floor(bigint_col), 1 from super', + 'select 1, floor(bigint_col), 1 from t1', + 'select 1, floor(float_col), 1 from super', + 'select 1, floor(float_col), 1 from t1', + 'select 1, floor(double_col), 1 from super', + 'select 1, floor(double_col), 1 from t1', + 'select 1, floor(smallint_col), 1 from super', + 'select 1, floor(smallint_col), 1 from t1', + 'select 1, floor(tinyint_col), 1 from super', + 'select 1, floor(tinyint_col), 1 from t1', + 'select 1, floor(uint_col), 1 from super', + 'select 1, floor(uint_col), 1 from t1', + 'select 1, floor(ubigint_col), 1 from super', + 'select 1, floor(ubigint_col), 1 from t1', + 'select 1, floor(usmallint_col), 1 from super', + 'select 1, floor(usmallint_col), 1 from t1', + 'select 1, floor(utinyint_col), 1 from super', + 'select 1, floor(utinyint_col), 1 from t1', + 'select floor(int_col) as anyName from super', + 'select floor(int_col) as anyName from t1', + 'select floor(bigint_col) as anyName from super', + 'select floor(bigint_col) as anyName from t1', + 'select floor(float_col) as anyName from super', + 'select floor(float_col) as anyName from t1', + 'select floor(double_col) as anyName from super', + 'select floor(double_col) as anyName from t1', + 'select floor(smallint_col) as anyName from super', + 'select floor(smallint_col) as anyName from t1', + 'select floor(tinyint_col) as anyName from super', + 'select floor(tinyint_col) as anyName from t1', + 'select floor(uint_col) as anyName from super', + 'select floor(uint_col) as anyName from t1', + 'select floor(ubigint_col) as anyName from super', + 'select floor(ubigint_col) as anyName from t1', + 'select floor(usmallint_col) as anyName from super', + 'select floor(usmallint_col) as anyName from t1', + 'select floor(utinyint_col) as anyName from super', + 'select floor(utinyint_col) as anyName from t1' + ] + shouldPass2 = ['select floor(super.int_col) from super', 'select floor(super.int_col) from super, superb where super.ts = superb.ts and super.int_tag = superb.int_tag', diff --git a/tests/pytest/functions/function_round.py b/tests/pytest/functions/function_round.py index 90a9cc6cb5ab11a56e267d292a481a5d9cb5b630..8785821452dfe0ed65bc784f2c5d6c20f0fa484b 100644 --- a/tests/pytest/functions/function_round.py +++ b/tests/pytest/functions/function_round.py @@ -1373,517 +1373,528 @@ class TDTestCase: self.randomUTinyint())) shouldPass = ['select round(int_col) from super', - 'select round(int_col) from t1', - 'select round(bigint_col) from super', - 'select round(bigint_col) from t1', - 'select round(float_col) from super', - 'select round(float_col) from t1', - 'select round(double_col) from super', - 'select round(double_col) from t1', - 'select round(smallint_col) from super', - 'select round(smallint_col) from t1', - 'select round(tinyint_col) from super', - 'select round(tinyint_col) from t1', - 'select round(uint_col) from super', - 'select round(uint_col) from t1', - 'select round(ubigint_col) from super', - 'select round(ubigint_col) from t1', - 'select round(usmallint_col) from super', - 'select round(usmallint_col) from t1', - 'select round(utinyint_col) from super', - 'select round(utinyint_col) from t1', - 'select round(int_col) - round(int_col) from super', - 'select round(int_col) - round(int_col) from t1', - 'select round(bigint_col) - round(bigint_col) from super', - 'select round(bigint_col) - round(bigint_col) from t1', - 'select round(float_col) - round(float_col) from super', - 'select round(float_col) - round(float_col) from t1', - 'select round(double_col) - round(double_col) from super', - 'select round(double_col) - round(double_col) from t1', - 'select round(smallint_col) - round(smallint_col) from super', - 'select round(smallint_col) - round(smallint_col) from t1', - 'select round(tinyint_col) - round(tinyint_col) from super', - 'select round(tinyint_col) - round(tinyint_col) from t1', - 'select round(uint_col) - round(uint_col) from super', - 'select round(uint_col) - round(uint_col) from t1', - 'select round(ubigint_col) - round(ubigint_col) from super', - 'select round(ubigint_col) - round(ubigint_col) from t1', - 'select round(usmallint_col) - round(usmallint_col) from super', - 'select round(usmallint_col) - round(usmallint_col) from t1', - 'select round(utinyint_col) - round(utinyint_col) from super', - 'select round(utinyint_col) - round(utinyint_col) from t1', - 'select round(int_col) / round(int_col) from super', - 'select round(int_col) / round(int_col) from t1', - 'select round(bigint_col) / round(bigint_col) from super', - 'select round(bigint_col) / round(bigint_col) from t1', - 'select round(float_col) / round(float_col) from super', - 'select round(float_col) / round(float_col) from t1', - 'select round(double_col) / round(double_col) from super', - 'select round(double_col) / round(double_col) from t1', - 'select round(smallint_col) / round(smallint_col) from super', - 'select round(smallint_col) / round(smallint_col) from t1', - 'select round(tinyint_col) / round(tinyint_col) from super', - 'select round(tinyint_col) / round(tinyint_col) from t1', - 'select round(uint_col) / round(uint_col) from super', - 'select round(uint_col) / round(uint_col) from t1', - 'select round(ubigint_col) / round(ubigint_col) from super', - 'select round(ubigint_col) / round(ubigint_col) from t1', - 'select round(usmallint_col) / round(usmallint_col) from super', - 'select round(usmallint_col) / round(usmallint_col) from t1', - 'select round(utinyint_col) / round(utinyint_col) from super', - 'select round(utinyint_col) / round(utinyint_col) from t1', - 'select round(int_col) * round(int_col) from super', - 'select round(int_col) * round(int_col) from t1', - 'select round(bigint_col) * round(bigint_col) from super', - 'select round(bigint_col) * round(bigint_col) from t1', - 'select round(float_col) * round(float_col) from super', - 'select round(float_col) * round(float_col) from t1', - 'select round(double_col) * round(double_col) from super', - 'select round(double_col) * round(double_col) from t1', - 'select round(smallint_col) * round(smallint_col) from super', - 'select round(smallint_col) * round(smallint_col) from t1', - 'select round(tinyint_col) * round(tinyint_col) from super', - 'select round(tinyint_col) * round(tinyint_col) from t1', - 'select round(uint_col) * round(uint_col) from super', - 'select round(uint_col) * round(uint_col) from t1', - 'select round(ubigint_col) * round(ubigint_col) from super', - 'select round(ubigint_col) * round(ubigint_col) from t1', - 'select round(usmallint_col) * round(usmallint_col) from super', - 'select round(usmallint_col) * round(usmallint_col) from t1', - 'select round(utinyint_col) * round(utinyint_col) from super', - 'select round(utinyint_col) * round(utinyint_col) from t1', - 'select round(count(ts)) from super', - 'select round(count(ts)) from t1', - 'select round(count(timestamp_col)) from super', - 'select round(count(timestamp_col)) from t1', - 'select round(count(int_col)) from super', - 'select round(count(int_col)) from t1', - 'select round(count(bigint_col)) from super', - 'select round(count(bigint_col)) from t1', - 'select round(count(float_col)) from super', - 'select round(count(float_col)) from t1', - 'select round(count(double_col)) from super', - 'select round(count(double_col)) from t1', - 'select round(count(binary_col)) from super', - 'select round(count(binary_col)) from t1', - 'select round(count(smallint_col)) from super', - 'select round(count(smallint_col)) from t1', - 'select round(count(tinyint_col)) from super', - 'select round(count(tinyint_col)) from t1', - 'select round(count(bool_col)) from super', - 'select round(count(bool_col)) from t1', - 'select round(count(nchar_col)) from super', - 'select round(count(nchar_col)) from t1', - 'select round(count(uint_col)) from super', - 'select round(count(uint_col)) from t1', - 'select round(count(ubigint_col)) from super', - 'select round(count(ubigint_col)) from t1', - 'select round(count(usmallint_col)) from super', - 'select round(count(usmallint_col)) from t1', - 'select round(count(utinyint_col)) from super', - 'select round(count(utinyint_col)) from t1', - 'select round(count(timestamp_tag)) from super', - 'select round(count(timestamp_tag)) from t1', - 'select round(count(int_tag)) from super', - 'select round(count(int_tag)) from t1', - 'select round(count(bigint_tag)) from super', - 'select round(count(bigint_tag)) from t1', - 'select round(count(float_tag)) from super', - 'select round(count(float_tag)) from t1', - 'select round(count(double_tag)) from super', - 'select round(count(double_tag)) from t1', - 'select round(count(binary_tag)) from super', - 'select round(count(binary_tag)) from t1', - 'select round(count(smallint_tag)) from super', - 'select round(count(smallint_tag)) from t1', - 'select round(count(tinyint_tag)) from super', - 'select round(count(tinyint_tag)) from t1', - 'select round(count(bool_tag)) from super', - 'select round(count(bool_tag)) from t1', - 'select round(count(nchar_tag)) from super', - 'select round(count(nchar_tag)) from t1', - 'select round(count(uint_tag)) from super', - 'select round(count(uint_tag)) from t1', - 'select round(count(ubigint_tag)) from super', - 'select round(count(ubigint_tag)) from t1', - 'select round(count(usmallint_tag)) from super', - 'select round(count(usmallint_tag)) from t1', - 'select round(count(utinyint_tag)) from super', - 'select round(count(utinyint_tag)) from t1', - 'select round(avg(int_col)) from super', - 'select round(avg(int_col)) from t1', - 'select round(avg(bigint_col)) from super', - 'select round(avg(bigint_col)) from t1', - 'select round(avg(float_col)) from super', - 'select round(avg(float_col)) from t1', - 'select round(avg(double_col)) from super', - 'select round(avg(double_col)) from t1', - 'select round(avg(smallint_col)) from super', - 'select round(avg(smallint_col)) from t1', - 'select round(avg(tinyint_col)) from super', - 'select round(avg(tinyint_col)) from t1', - 'select round(avg(uint_col)) from super', - 'select round(avg(uint_col)) from t1', - 'select round(avg(ubigint_col)) from super', - 'select round(avg(ubigint_col)) from t1', - 'select round(avg(usmallint_col)) from super', - 'select round(avg(usmallint_col)) from t1', - 'select round(avg(utinyint_col)) from super', - 'select round(avg(utinyint_col)) from t1', - 'select round(twa(int_col)) from t1', - 'select round(twa(bigint_col)) from t1', - 'select round(twa(float_col)) from t1', - 'select round(twa(double_col)) from t1', - 'select round(twa(smallint_col)) from t1', - 'select round(twa(tinyint_col)) from t1', - 'select round(twa(uint_col)) from t1', - 'select round(twa(ubigint_col)) from t1', - 'select round(twa(usmallint_col)) from t1', - 'select round(twa(utinyint_col)) from t1', - 'select round(sum(int_col)) from super', - 'select round(sum(int_col)) from t1', - 'select round(sum(bigint_col)) from super', - 'select round(sum(bigint_col)) from t1', - 'select round(sum(float_col)) from super', - 'select round(sum(float_col)) from t1', - 'select round(sum(double_col)) from super', - 'select round(sum(double_col)) from t1', - 'select round(sum(smallint_col)) from super', - 'select round(sum(smallint_col)) from t1', - 'select round(sum(tinyint_col)) from super', - 'select round(sum(tinyint_col)) from t1', - 'select round(sum(uint_col)) from super', - 'select round(sum(uint_col)) from t1', - 'select round(sum(ubigint_col)) from super', - 'select round(sum(ubigint_col)) from t1', - 'select round(sum(usmallint_col)) from super', - 'select round(sum(usmallint_col)) from t1', - 'select round(sum(utinyint_col)) from super', - 'select round(sum(utinyint_col)) from t1', - 'select round(stddev(int_col)) from super', - 'select round(stddev(int_col)) from t1', - 'select round(stddev(bigint_col)) from super', - 'select round(stddev(bigint_col)) from t1', - 'select round(stddev(float_col)) from super', - 'select round(stddev(float_col)) from t1', - 'select round(stddev(double_col)) from super', - 'select round(stddev(double_col)) from t1', - 'select round(stddev(smallint_col)) from super', - 'select round(stddev(smallint_col)) from t1', - 'select round(stddev(tinyint_col)) from super', - 'select round(stddev(tinyint_col)) from t1', - 'select round(stddev(uint_col)) from super', - 'select round(stddev(uint_col)) from t1', - 'select round(stddev(ubigint_col)) from super', - 'select round(stddev(ubigint_col)) from t1', - 'select round(stddev(usmallint_col)) from super', - 'select round(stddev(usmallint_col)) from t1', - 'select round(stddev(utinyint_col)) from super', - 'select round(stddev(utinyint_col)) from t1', - 'select round(irate(int_col)) from t1', - 'select round(irate(bigint_col)) from t1', - 'select round(irate(float_col)) from t1', - 'select round(irate(double_col)) from t1', - 'select round(irate(smallint_col)) from t1', - 'select round(irate(tinyint_col)) from t1', - 'select round(irate(uint_col)) from t1', - 'select round(irate(ubigint_col)) from t1', - 'select round(irate(usmallint_col)) from t1', - 'select round(irate(utinyint_col)) from t1', - 'select round(min(int_col)) from super', - 'select round(min(int_col)) from t1', - 'select round(min(bigint_col)) from super', - 'select round(min(bigint_col)) from t1', - 'select round(min(float_col)) from super', - 'select round(min(float_col)) from t1', - 'select round(min(double_col)) from super', - 'select round(min(double_col)) from t1', - 'select round(min(smallint_col)) from super', - 'select round(min(smallint_col)) from t1', - 'select round(min(tinyint_col)) from super', - 'select round(min(tinyint_col)) from t1', - 'select round(min(uint_col)) from super', - 'select round(min(uint_col)) from t1', - 'select round(min(ubigint_col)) from super', - 'select round(min(ubigint_col)) from t1', - 'select round(min(usmallint_col)) from super', - 'select round(min(usmallint_col)) from t1', - 'select round(min(utinyint_col)) from super', - 'select round(min(utinyint_col)) from t1', - 'select round(max(int_col)) from super', - 'select round(max(int_col)) from t1', - 'select round(max(bigint_col)) from super', - 'select round(max(bigint_col)) from t1', - 'select round(max(float_col)) from super', - 'select round(max(float_col)) from t1', - 'select round(max(double_col)) from super', - 'select round(max(double_col)) from t1', - 'select round(max(smallint_col)) from super', - 'select round(max(smallint_col)) from t1', - 'select round(max(tinyint_col)) from super', - 'select round(max(tinyint_col)) from t1', - 'select round(max(uint_col)) from super', - 'select round(max(uint_col)) from t1', - 'select round(max(ubigint_col)) from super', - 'select round(max(ubigint_col)) from t1', - 'select round(max(usmallint_col)) from super', - 'select round(max(usmallint_col)) from t1', - 'select round(max(utinyint_col)) from super', - 'select round(max(utinyint_col)) from t1', - 'select round(first(int_col)) from super', - 'select round(first(int_col)) from t1', - 'select round(first(bigint_col)) from super', - 'select round(first(bigint_col)) from t1', - 'select round(first(float_col)) from super', - 'select round(first(float_col)) from t1', - 'select round(first(double_col)) from super', - 'select round(first(double_col)) from t1', - 'select round(first(smallint_col)) from super', - 'select round(first(smallint_col)) from t1', - 'select round(first(tinyint_col)) from super', - 'select round(first(tinyint_col)) from t1', - 'select round(first(uint_col)) from super', - 'select round(first(uint_col)) from t1', - 'select round(first(ubigint_col)) from super', - 'select round(first(ubigint_col)) from t1', - 'select round(first(usmallint_col)) from super', - 'select round(first(usmallint_col)) from t1', - 'select round(first(utinyint_col)) from super', - 'select round(first(utinyint_col)) from t1', - 'select round(last(int_col)) from super', - 'select round(last(int_col)) from t1', - 'select round(last(bigint_col)) from super', - 'select round(last(bigint_col)) from t1', - 'select round(last(float_col)) from super', - 'select round(last(float_col)) from t1', - 'select round(last(double_col)) from super', - 'select round(last(double_col)) from t1', - 'select round(last(smallint_col)) from super', - 'select round(last(smallint_col)) from t1', - 'select round(last(tinyint_col)) from super', - 'select round(last(tinyint_col)) from t1', - 'select round(last(uint_col)) from super', - 'select round(last(uint_col)) from t1', - 'select round(last(ubigint_col)) from super', - 'select round(last(ubigint_col)) from t1', - 'select round(last(usmallint_col)) from super', - 'select round(last(usmallint_col)) from t1', - 'select round(last(utinyint_col)) from super', - 'select round(last(utinyint_col)) from t1', - 'select round(percentile(int_col, 1)) from t1', - 'select round(percentile(bigint_col, 1)) from t1', - 'select round(percentile(float_col, 1)) from t1', - 'select round(percentile(double_col, 1)) from t1', - 'select round(percentile(smallint_col, 1)) from t1', - 'select round(percentile(tinyint_col, 1)) from t1', - 'select round(percentile(uint_col, 1)) from t1', - 'select round(percentile(ubigint_col, 1)) from t1', - 'select round(percentile(usmallint_col, 1)) from t1', - 'select round(percentile(utinyint_col, 1)) from t1', - 'select round(apercentile(int_col, 1)) from super', - 'select round(apercentile(int_col, 1)) from t1', - 'select round(apercentile(bigint_col, 1)) from super', - 'select round(apercentile(bigint_col, 1)) from t1', - 'select round(apercentile(float_col, 1)) from super', - 'select round(apercentile(float_col, 1)) from t1', - 'select round(apercentile(double_col, 1)) from super', - 'select round(apercentile(double_col, 1)) from t1', - 'select round(apercentile(smallint_col, 1)) from super', - 'select round(apercentile(smallint_col, 1)) from t1', - 'select round(apercentile(tinyint_col, 1)) from super', - 'select round(apercentile(tinyint_col, 1)) from t1', - 'select round(apercentile(uint_col, 1)) from super', - 'select round(apercentile(uint_col, 1)) from t1', - 'select round(apercentile(ubigint_col, 1)) from super', - 'select round(apercentile(ubigint_col, 1)) from t1', - 'select round(apercentile(usmallint_col, 1)) from super', - 'select round(apercentile(usmallint_col, 1)) from t1', - 'select round(apercentile(utinyint_col, 1)) from super', - 'select round(apercentile(utinyint_col, 1)) from t1', - 'select round(last_row(int_col)) from super', - 'select round(last_row(int_col)) from t1', - 'select round(last_row(bigint_col)) from super', - 'select round(last_row(bigint_col)) from t1', - 'select round(last_row(float_col)) from super', - 'select round(last_row(float_col)) from t1', - 'select round(last_row(double_col)) from super', - 'select round(last_row(double_col)) from t1', - 'select round(last_row(smallint_col)) from super', - 'select round(last_row(smallint_col)) from t1', - 'select round(last_row(tinyint_col)) from super', - 'select round(last_row(tinyint_col)) from t1', - 'select round(last_row(uint_col)) from super', - 'select round(last_row(uint_col)) from t1', - 'select round(last_row(ubigint_col)) from super', - 'select round(last_row(ubigint_col)) from t1', - 'select round(last_row(usmallint_col)) from super', - 'select round(last_row(usmallint_col)) from t1', - 'select round(last_row(utinyint_col)) from super', - 'select round(last_row(utinyint_col)) from t1', - 'select round(spread(ts)) from super', - 'select round(spread(ts)) from t1', - 'select round(spread(timestamp_col)) from super', - 'select round(spread(timestamp_col)) from t1', - 'select round(spread(int_col)) from super', - 'select round(spread(int_col)) from t1', - 'select round(spread(bigint_col)) from super', - 'select round(spread(bigint_col)) from t1', - 'select round(spread(float_col)) from super', - 'select round(spread(float_col)) from t1', - 'select round(spread(double_col)) from super', - 'select round(spread(double_col)) from t1', - 'select round(spread(smallint_col)) from super', - 'select round(spread(smallint_col)) from t1', - 'select round(spread(tinyint_col)) from super', - 'select round(spread(tinyint_col)) from t1', - 'select round(spread(uint_col)) from super', - 'select round(spread(uint_col)) from t1', - 'select round(spread(ubigint_col)) from super', - 'select round(spread(ubigint_col)) from t1', - 'select round(spread(usmallint_col)) from super', - 'select round(spread(usmallint_col)) from t1', - 'select round(spread(utinyint_col)) from super', - 'select round(spread(utinyint_col)) from t1', - 'select round(int_col + int_col) from super', - 'select round(int_col + int_col) from t1', - 'select round(bigint_col + bigint_col) from super', - 'select round(bigint_col + bigint_col) from t1', - 'select round(float_col + float_col) from super', - 'select round(float_col + float_col) from t1', - 'select round(double_col + double_col) from super', - 'select round(double_col + double_col) from t1', - 'select round(smallint_col + smallint_col) from super', - 'select round(smallint_col + smallint_col) from t1', - 'select round(tinyint_col + tinyint_col) from super', - 'select round(tinyint_col + tinyint_col) from t1', - 'select round(uint_col + uint_col) from super', - 'select round(uint_col + uint_col) from t1', - 'select round(ubigint_col + ubigint_col) from super', - 'select round(ubigint_col + ubigint_col) from t1', - 'select round(usmallint_col + usmallint_col) from super', - 'select round(usmallint_col + usmallint_col) from t1', - 'select round(utinyint_col + utinyint_col) from super', - 'select round(utinyint_col + utinyint_col) from t1', - 'select round(int_col - int_col) from super', - 'select round(int_col - int_col) from t1', - 'select round(bigint_col - bigint_col) from super', - 'select round(bigint_col - bigint_col) from t1', - 'select round(float_col - float_col) from super', - 'select round(float_col - float_col) from t1', - 'select round(double_col - double_col) from super', - 'select round(double_col - double_col) from t1', - 'select round(smallint_col - smallint_col) from super', - 'select round(smallint_col - smallint_col) from t1', - 'select round(tinyint_col - tinyint_col) from super', - 'select round(tinyint_col - tinyint_col) from t1', - 'select round(uint_col - uint_col) from super', - 'select round(uint_col - uint_col) from t1', - 'select round(ubigint_col - ubigint_col) from super', - 'select round(ubigint_col - ubigint_col) from t1', - 'select round(usmallint_col - usmallint_col) from super', - 'select round(usmallint_col - usmallint_col) from t1', - 'select round(utinyint_col - utinyint_col) from super', - 'select round(utinyint_col - utinyint_col) from t1', - 'select round(int_col * int_col) from super', - 'select round(int_col * int_col) from t1', - 'select round(bigint_col * bigint_col) from super', - 'select round(bigint_col * bigint_col) from t1', - 'select round(float_col * float_col) from super', - 'select round(float_col * float_col) from t1', - 'select round(double_col * double_col) from super', - 'select round(double_col * double_col) from t1', - 'select round(smallint_col * smallint_col) from super', - 'select round(smallint_col * smallint_col) from t1', - 'select round(tinyint_col * tinyint_col) from super', - 'select round(tinyint_col * tinyint_col) from t1', - 'select round(uint_col * uint_col) from super', - 'select round(uint_col * uint_col) from t1', - 'select round(ubigint_col * ubigint_col) from super', - 'select round(ubigint_col * ubigint_col) from t1', - 'select round(usmallint_col * usmallint_col) from super', - 'select round(usmallint_col * usmallint_col) from t1', - 'select round(utinyint_col * utinyint_col) from super', - 'select round(utinyint_col * utinyint_col) from t1', - 'select round(int_col / int_col) from super', - 'select round(int_col / int_col) from t1', - 'select round(bigint_col / bigint_col) from super', - 'select round(bigint_col / bigint_col) from t1', - 'select round(float_col / float_col) from super', - 'select round(float_col / float_col) from t1', - 'select round(double_col / double_col) from super', - 'select round(double_col / double_col) from t1', - 'select round(smallint_col / smallint_col) from super', - 'select round(smallint_col / smallint_col) from t1', - 'select round(tinyint_col / tinyint_col) from super', - 'select round(tinyint_col / tinyint_col) from t1', - 'select round(uint_col / uint_col) from super', - 'select round(uint_col / uint_col) from t1', - 'select round(ubigint_col / ubigint_col) from super', - 'select round(ubigint_col / ubigint_col) from t1', - 'select round(usmallint_col / usmallint_col) from super', - 'select round(usmallint_col / usmallint_col) from t1', - 'select round(utinyint_col / utinyint_col) from super', - 'select round(utinyint_col / utinyint_col) from t1', - 'select int_col, round(int_col), int_col from super', - 'select int_col, round(int_col), int_col from t1', - 'select bigint_col, round(bigint_col), bigint_col from super', - 'select bigint_col, round(bigint_col), bigint_col from t1', - 'select float_col, round(float_col), float_col from super', - 'select float_col, round(float_col), float_col from t1', - 'select double_col, round(double_col), double_col from super', - 'select double_col, round(double_col), double_col from t1', - 'select smallint_col, round(smallint_col), smallint_col from super', - 'select smallint_col, round(smallint_col), smallint_col from t1', - 'select tinyint_col, round(tinyint_col), tinyint_col from super', - 'select tinyint_col, round(tinyint_col), tinyint_col from t1', - 'select uint_col, round(uint_col), uint_col from super', - 'select uint_col, round(uint_col), uint_col from t1', - 'select ubigint_col, round(ubigint_col), ubigint_col from super', - 'select ubigint_col, round(ubigint_col), ubigint_col from t1', - 'select usmallint_col, round(usmallint_col), usmallint_col from super', - 'select usmallint_col, round(usmallint_col), usmallint_col from t1', - 'select utinyint_col, round(utinyint_col), utinyint_col from super', - 'select utinyint_col, round(utinyint_col), utinyint_col from t1', - 'select 1, round(int_col), 1 from super', - 'select 1, round(int_col), 1 from t1', - 'select 1, round(bigint_col), 1 from super', - 'select 1, round(bigint_col), 1 from t1', - 'select 1, round(float_col), 1 from super', - 'select 1, round(float_col), 1 from t1', - 'select 1, round(double_col), 1 from super', - 'select 1, round(double_col), 1 from t1', - 'select 1, round(smallint_col), 1 from super', - 'select 1, round(smallint_col), 1 from t1', - 'select 1, round(tinyint_col), 1 from super', - 'select 1, round(tinyint_col), 1 from t1', - 'select 1, round(uint_col), 1 from super', - 'select 1, round(uint_col), 1 from t1', - 'select 1, round(ubigint_col), 1 from super', - 'select 1, round(ubigint_col), 1 from t1', - 'select 1, round(usmallint_col), 1 from super', - 'select 1, round(usmallint_col), 1 from t1', - 'select 1, round(utinyint_col), 1 from super', - 'select 1, round(utinyint_col), 1 from t1', - 'select round(int_col) as anyName from super', - 'select round(int_col) as anyName from t1', - 'select round(bigint_col) as anyName from super', - 'select round(bigint_col) as anyName from t1', - 'select round(float_col) as anyName from super', - 'select round(float_col) as anyName from t1', - 'select round(double_col) as anyName from super', - 'select round(double_col) as anyName from t1', - 'select round(smallint_col) as anyName from super', - 'select round(smallint_col) as anyName from t1', - 'select round(tinyint_col) as anyName from super', - 'select round(tinyint_col) as anyName from t1', - 'select round(uint_col) as anyName from super', - 'select round(uint_col) as anyName from t1', - 'select round(ubigint_col) as anyName from super', - 'select round(ubigint_col) as anyName from t1', - 'select round(usmallint_col) as anyName from super', - 'select round(usmallint_col) as anyName from t1', - 'select round(utinyint_col) as anyName from super', - 'select round(utinyint_col) as anyName from t1'] + 'select round(int_col) from t1', + 'select round(bigint_col) from super', + 'select round(bigint_col) from t1', + 'select round(float_col) from super', + 'select round(float_col) from t1', + 'select round(double_col) from super', + 'select round(double_col) from t1', + 'select round(smallint_col) from super', + 'select round(smallint_col) from t1', + 'select round(tinyint_col) from super', + 'select round(tinyint_col) from t1', + 'select round(uint_col) from super', + 'select round(uint_col) from t1', + 'select round(ubigint_col) from super', + 'select round(ubigint_col) from t1', + 'select round(usmallint_col) from super', + 'select round(usmallint_col) from t1', + 'select round(utinyint_col) from super', + 'select round(utinyint_col) from t1', + 'select round(int_col) - round(int_col) from super', + 'select round(int_col) - round(int_col) from t1', + 'select round(bigint_col) - round(bigint_col) from super', + 'select round(bigint_col) - round(bigint_col) from t1', + 'select round(float_col) - round(float_col) from super', + 'select round(float_col) - round(float_col) from t1', + 'select round(double_col) - round(double_col) from super', + 'select round(double_col) - round(double_col) from t1', + 'select round(smallint_col) - round(smallint_col) from super', + 'select round(smallint_col) - round(smallint_col) from t1', + 'select round(tinyint_col) - round(tinyint_col) from super', + 'select round(tinyint_col) - round(tinyint_col) from t1', + 'select round(uint_col) - round(uint_col) from super', + 'select round(uint_col) - round(uint_col) from t1', + 'select round(ubigint_col) - round(ubigint_col) from super', + 'select round(ubigint_col) - round(ubigint_col) from t1', + 'select round(usmallint_col) - round(usmallint_col) from super', + 'select round(usmallint_col) - round(usmallint_col) from t1', + 'select round(utinyint_col) - round(utinyint_col) from super', + 'select round(utinyint_col) - round(utinyint_col) from t1', + 'select round(int_col) / round(int_col) from super', + 'select round(int_col) / round(int_col) from t1', + 'select round(bigint_col) / round(bigint_col) from super', + 'select round(bigint_col) / round(bigint_col) from t1', + 'select round(float_col) / round(float_col) from super', + 'select round(float_col) / round(float_col) from t1', + 'select round(double_col) / round(double_col) from super', + 'select round(double_col) / round(double_col) from t1', + 'select round(smallint_col) / round(smallint_col) from super', + 'select round(smallint_col) / round(smallint_col) from t1', + 'select round(tinyint_col) / round(tinyint_col) from super', + 'select round(tinyint_col) / round(tinyint_col) from t1', + 'select round(uint_col) / round(uint_col) from super', + 'select round(uint_col) / round(uint_col) from t1', + 'select round(ubigint_col) / round(ubigint_col) from super', + 'select round(ubigint_col) / round(ubigint_col) from t1', + 'select round(usmallint_col) / round(usmallint_col) from super', + 'select round(usmallint_col) / round(usmallint_col) from t1', + 'select round(utinyint_col) / round(utinyint_col) from super', + 'select round(utinyint_col) / round(utinyint_col) from t1', + 'select round(int_col) * round(int_col) from super', + 'select round(int_col) * round(int_col) from t1', + 'select round(bigint_col) * round(bigint_col) from super', + 'select round(bigint_col) * round(bigint_col) from t1', + 'select round(float_col) * round(float_col) from super', + 'select round(float_col) * round(float_col) from t1', + 'select round(double_col) * round(double_col) from super', + 'select round(double_col) * round(double_col) from t1', + 'select round(smallint_col) * round(smallint_col) from super', + 'select round(smallint_col) * round(smallint_col) from t1', + 'select round(tinyint_col) * round(tinyint_col) from super', + 'select round(tinyint_col) * round(tinyint_col) from t1', + 'select round(uint_col) * round(uint_col) from super', + 'select round(uint_col) * round(uint_col) from t1', + 'select round(ubigint_col) * round(ubigint_col) from super', + 'select round(ubigint_col) * round(ubigint_col) from t1', + 'select round(usmallint_col) * round(usmallint_col) from super', + 'select round(usmallint_col) * round(usmallint_col) from t1', + 'select round(utinyint_col) * round(utinyint_col) from super', + 'select round(utinyint_col) * round(utinyint_col) from t1', + 'select round(count(ts)) from super', + 'select round(count(ts)) from t1', + 'select round(count(timestamp_col)) from super', + 'select round(count(timestamp_col)) from t1', + 'select round(count(int_col)) from super', + 'select round(count(int_col)) from t1', + 'select round(count(bigint_col)) from super', + 'select round(count(bigint_col)) from t1', + 'select round(count(float_col)) from super', + 'select round(count(float_col)) from t1', + 'select round(count(double_col)) from super', + 'select round(count(double_col)) from t1', + 'select round(count(binary_col)) from super', + 'select round(count(binary_col)) from t1', + 'select round(count(smallint_col)) from super', + 'select round(count(smallint_col)) from t1', + 'select round(count(tinyint_col)) from super', + 'select round(count(tinyint_col)) from t1', + 'select round(count(bool_col)) from super', + 'select round(count(bool_col)) from t1', + 'select round(count(nchar_col)) from super', + 'select round(count(nchar_col)) from t1', + 'select round(count(uint_col)) from super', + 'select round(count(uint_col)) from t1', + 'select round(count(ubigint_col)) from super', + 'select round(count(ubigint_col)) from t1', + 'select round(count(usmallint_col)) from super', + 'select round(count(usmallint_col)) from t1', + 'select round(count(utinyint_col)) from super', + 'select round(count(utinyint_col)) from t1', + 'select round(count(timestamp_tag)) from super', + 'select round(count(timestamp_tag)) from t1', + 'select round(count(int_tag)) from super', + 'select round(count(int_tag)) from t1', + 'select round(count(bigint_tag)) from super', + 'select round(count(bigint_tag)) from t1', + 'select round(count(float_tag)) from super', + 'select round(count(float_tag)) from t1', + 'select round(count(double_tag)) from super', + 'select round(count(double_tag)) from t1', + 'select round(count(binary_tag)) from super', + 'select round(count(binary_tag)) from t1', + 'select round(count(smallint_tag)) from super', + 'select round(count(smallint_tag)) from t1', + 'select round(count(tinyint_tag)) from super', + 'select round(count(tinyint_tag)) from t1', + 'select round(count(bool_tag)) from super', + 'select round(count(bool_tag)) from t1', + 'select round(count(nchar_tag)) from super', + 'select round(count(nchar_tag)) from t1', + 'select round(count(uint_tag)) from super', + 'select round(count(uint_tag)) from t1', + 'select round(count(ubigint_tag)) from super', + 'select round(count(ubigint_tag)) from t1', + 'select round(count(usmallint_tag)) from super', + 'select round(count(usmallint_tag)) from t1', + 'select round(count(utinyint_tag)) from super', + 'select round(count(utinyint_tag)) from t1', + 'select round(avg(int_col)) from super', + 'select round(avg(int_col)) from t1', + 'select round(avg(bigint_col)) from super', + 'select round(avg(bigint_col)) from t1', + 'select round(avg(float_col)) from super', + 'select round(avg(float_col)) from t1', + 'select round(avg(double_col)) from super', + 'select round(avg(double_col)) from t1', + 'select round(avg(smallint_col)) from super', + 'select round(avg(smallint_col)) from t1', + 'select round(avg(tinyint_col)) from super', + 'select round(avg(tinyint_col)) from t1', + 'select round(avg(uint_col)) from super', + 'select round(avg(uint_col)) from t1', + 'select round(avg(ubigint_col)) from super', + 'select round(avg(ubigint_col)) from t1', + 'select round(avg(usmallint_col)) from super', + 'select round(avg(usmallint_col)) from t1', + 'select round(avg(utinyint_col)) from super', + 'select round(avg(utinyint_col)) from t1', + 'select round(twa(int_col)) from t1', + 'select round(twa(bigint_col)) from t1', + 'select round(twa(float_col)) from t1', + 'select round(twa(double_col)) from t1', + 'select round(twa(smallint_col)) from t1', + 'select round(twa(tinyint_col)) from t1', + 'select round(twa(uint_col)) from t1', + 'select round(twa(ubigint_col)) from t1', + 'select round(twa(usmallint_col)) from t1', + 'select round(twa(utinyint_col)) from t1', + 'select round(sum(int_col)) from super', + 'select round(sum(int_col)) from t1', + 'select round(sum(bigint_col)) from super', + 'select round(sum(bigint_col)) from t1', + 'select round(sum(float_col)) from super', + 'select round(sum(float_col)) from t1', + 'select round(sum(double_col)) from super', + 'select round(sum(double_col)) from t1', + 'select round(sum(smallint_col)) from super', + 'select round(sum(smallint_col)) from t1', + 'select round(sum(tinyint_col)) from super', + 'select round(sum(tinyint_col)) from t1', + 'select round(sum(uint_col)) from super', + 'select round(sum(uint_col)) from t1', + 'select round(sum(ubigint_col)) from super', + 'select round(sum(ubigint_col)) from t1', + 'select round(sum(usmallint_col)) from super', + 'select round(sum(usmallint_col)) from t1', + 'select round(sum(utinyint_col)) from super', + 'select round(sum(utinyint_col)) from t1', + 'select round(stddev(int_col)) from super', + 'select round(stddev(int_col)) from t1', + 'select round(stddev(bigint_col)) from super', + 'select round(stddev(bigint_col)) from t1', + 'select round(stddev(float_col)) from super', + 'select round(stddev(float_col)) from t1', + 'select round(stddev(double_col)) from super', + 'select round(stddev(double_col)) from t1', + 'select round(stddev(smallint_col)) from super', + 'select round(stddev(smallint_col)) from t1', + 'select round(stddev(tinyint_col)) from super', + 'select round(stddev(tinyint_col)) from t1', + 'select round(stddev(uint_col)) from super', + 'select round(stddev(uint_col)) from t1', + 'select round(stddev(ubigint_col)) from super', + 'select round(stddev(ubigint_col)) from t1', + 'select round(stddev(usmallint_col)) from super', + 'select round(stddev(usmallint_col)) from t1', + 'select round(stddev(utinyint_col)) from super', + 'select round(stddev(utinyint_col)) from t1', + 'select round(irate(int_col)) from t1', + 'select round(irate(bigint_col)) from t1', + 'select round(irate(float_col)) from t1', + 'select round(irate(double_col)) from t1', + 'select round(irate(smallint_col)) from t1', + 'select round(irate(tinyint_col)) from t1', + 'select round(irate(uint_col)) from t1', + 'select round(irate(ubigint_col)) from t1', + 'select round(irate(usmallint_col)) from t1', + 'select round(irate(utinyint_col)) from t1', + 'select round(min(int_col)) from super', + 'select round(min(int_col)) from t1', + 'select round(min(bigint_col)) from super', + 'select round(min(bigint_col)) from t1', + 'select round(min(float_col)) from super', + 'select round(min(float_col)) from t1', + 'select round(min(double_col)) from super', + 'select round(min(double_col)) from t1', + 'select round(min(smallint_col)) from super', + 'select round(min(smallint_col)) from t1', + 'select round(min(tinyint_col)) from super', + 'select round(min(tinyint_col)) from t1', + 'select round(min(uint_col)) from super', + 'select round(min(uint_col)) from t1', + 'select round(min(ubigint_col)) from super', + 'select round(min(ubigint_col)) from t1', + 'select round(min(usmallint_col)) from super', + 'select round(min(usmallint_col)) from t1', + 'select round(min(utinyint_col)) from super', + 'select round(min(utinyint_col)) from t1', + 'select round(max(int_col)) from super', + 'select round(max(int_col)) from t1', + 'select round(max(bigint_col)) from super', + 'select round(max(bigint_col)) from t1', + 'select round(max(float_col)) from super', + 'select round(max(float_col)) from t1', + 'select round(max(double_col)) from super', + 'select round(max(double_col)) from t1', + 'select round(max(smallint_col)) from super', + 'select round(max(smallint_col)) from t1', + 'select round(max(tinyint_col)) from super', + 'select round(max(tinyint_col)) from t1', + 'select round(max(uint_col)) from super', + 'select round(max(uint_col)) from t1', + 'select round(max(ubigint_col)) from super', + 'select round(max(ubigint_col)) from t1', + 'select round(max(usmallint_col)) from super', + 'select round(max(usmallint_col)) from t1', + 'select round(max(utinyint_col)) from super', + 'select round(max(utinyint_col)) from t1', + 'select round(first(int_col)) from super', + 'select round(first(int_col)) from t1', + 'select round(first(bigint_col)) from super', + 'select round(first(bigint_col)) from t1', + 'select round(first(float_col)) from super', + 'select round(first(float_col)) from t1', + 'select round(first(double_col)) from super', + 'select round(first(double_col)) from t1', + 'select round(first(smallint_col)) from super', + 'select round(first(smallint_col)) from t1', + 'select round(first(tinyint_col)) from super', + 'select round(first(tinyint_col)) from t1', + 'select round(first(uint_col)) from super', + 'select round(first(uint_col)) from t1', + 'select round(first(ubigint_col)) from super', + 'select round(first(ubigint_col)) from t1', + 'select round(first(usmallint_col)) from super', + 'select round(first(usmallint_col)) from t1', + 'select round(first(utinyint_col)) from super', + 'select round(first(utinyint_col)) from t1', + 'select round(last(int_col)) from super', + 'select round(last(int_col)) from t1', + 'select round(last(bigint_col)) from super', + 'select round(last(bigint_col)) from t1', + 'select round(last(float_col)) from super', + 'select round(last(float_col)) from t1', + 'select round(last(double_col)) from super', + 'select round(last(double_col)) from t1', + 'select round(last(smallint_col)) from super', + 'select round(last(smallint_col)) from t1', + 'select round(last(tinyint_col)) from super', + 'select round(last(tinyint_col)) from t1', + 'select round(last(uint_col)) from super', + 'select round(last(uint_col)) from t1', + 'select round(last(ubigint_col)) from super', + 'select round(last(ubigint_col)) from t1', + 'select round(last(usmallint_col)) from super', + 'select round(last(usmallint_col)) from t1', + 'select round(last(utinyint_col)) from super', + 'select round(last(utinyint_col)) from t1', + 'select round(percentile(int_col, 1)) from t1', + 'select round(percentile(bigint_col, 1)) from t1', + 'select round(percentile(float_col, 1)) from t1', + 'select round(percentile(double_col, 1)) from t1', + 'select round(percentile(smallint_col, 1)) from t1', + 'select round(percentile(tinyint_col, 1)) from t1', + 'select round(percentile(uint_col, 1)) from t1', + 'select round(percentile(ubigint_col, 1)) from t1', + 'select round(percentile(usmallint_col, 1)) from t1', + 'select round(percentile(utinyint_col, 1)) from t1', + 'select round(apercentile(int_col, 1)) from super', + 'select round(apercentile(int_col, 1)) from t1', + 'select round(apercentile(bigint_col, 1)) from super', + 'select round(apercentile(bigint_col, 1)) from t1', + 'select round(apercentile(float_col, 1)) from super', + 'select round(apercentile(float_col, 1)) from t1', + 'select round(apercentile(double_col, 1)) from super', + 'select round(apercentile(double_col, 1)) from t1', + 'select round(apercentile(smallint_col, 1)) from super', + 'select round(apercentile(smallint_col, 1)) from t1', + 'select round(apercentile(tinyint_col, 1)) from super', + 'select round(apercentile(tinyint_col, 1)) from t1', + 'select round(apercentile(uint_col, 1)) from super', + 'select round(apercentile(uint_col, 1)) from t1', + 'select round(apercentile(ubigint_col, 1)) from super', + 'select round(apercentile(ubigint_col, 1)) from t1', + 'select round(apercentile(usmallint_col, 1)) from super', + 'select round(apercentile(usmallint_col, 1)) from t1', + 'select round(apercentile(utinyint_col, 1)) from super', + 'select round(apercentile(utinyint_col, 1)) from t1', + 'select round(last_row(int_col)) from super', + 'select round(last_row(int_col)) from t1', + 'select round(last_row(bigint_col)) from super', + 'select round(last_row(bigint_col)) from t1', + 'select round(last_row(float_col)) from super', + 'select round(last_row(float_col)) from t1', + 'select round(last_row(double_col)) from super', + 'select round(last_row(double_col)) from t1', + 'select round(last_row(smallint_col)) from super', + 'select round(last_row(smallint_col)) from t1', + 'select round(last_row(tinyint_col)) from super', + 'select round(last_row(tinyint_col)) from t1', + 'select round(last_row(uint_col)) from super', + 'select round(last_row(uint_col)) from t1', + 'select round(last_row(ubigint_col)) from super', + 'select round(last_row(ubigint_col)) from t1', + 'select round(last_row(usmallint_col)) from super', + 'select round(last_row(usmallint_col)) from t1', + 'select round(last_row(utinyint_col)) from super', + 'select round(last_row(utinyint_col)) from t1', + 'select round(interp(int_col)) from t1', + 'select round(interp(bigint_col)) from t1', + 'select round(interp(float_col)) from t1', + 'select round(interp(double_col)) from t1', + 'select round(interp(smallint_col)) from t1', + 'select round(interp(tinyint_col)) from t1', + 'select round(interp(uint_col)) from t1', + 'select round(interp(ubigint_col)) from t1', + 'select round(interp(usmallint_col)) from t1', + 'select round(interp(utinyint_col)) from t1', + 'select round(spread(ts)) from super', + 'select round(spread(ts)) from t1', + 'select round(spread(timestamp_col)) from super', + 'select round(spread(timestamp_col)) from t1', + 'select round(spread(int_col)) from super', + 'select round(spread(int_col)) from t1', + 'select round(spread(bigint_col)) from super', + 'select round(spread(bigint_col)) from t1', + 'select round(spread(float_col)) from super', + 'select round(spread(float_col)) from t1', + 'select round(spread(double_col)) from super', + 'select round(spread(double_col)) from t1', + 'select round(spread(smallint_col)) from super', + 'select round(spread(smallint_col)) from t1', + 'select round(spread(tinyint_col)) from super', + 'select round(spread(tinyint_col)) from t1', + 'select round(spread(uint_col)) from super', + 'select round(spread(uint_col)) from t1', + 'select round(spread(ubigint_col)) from super', + 'select round(spread(ubigint_col)) from t1', + 'select round(spread(usmallint_col)) from super', + 'select round(spread(usmallint_col)) from t1', + 'select round(spread(utinyint_col)) from super', + 'select round(spread(utinyint_col)) from t1', + 'select round(int_col + int_col) from super', + 'select round(int_col + int_col) from t1', + 'select round(bigint_col + bigint_col) from super', + 'select round(bigint_col + bigint_col) from t1', + 'select round(float_col + float_col) from super', + 'select round(float_col + float_col) from t1', + 'select round(double_col + double_col) from super', + 'select round(double_col + double_col) from t1', + 'select round(smallint_col + smallint_col) from super', + 'select round(smallint_col + smallint_col) from t1', + 'select round(tinyint_col + tinyint_col) from super', + 'select round(tinyint_col + tinyint_col) from t1', + 'select round(uint_col + uint_col) from super', + 'select round(uint_col + uint_col) from t1', + 'select round(ubigint_col + ubigint_col) from super', + 'select round(ubigint_col + ubigint_col) from t1', + 'select round(usmallint_col + usmallint_col) from super', + 'select round(usmallint_col + usmallint_col) from t1', + 'select round(utinyint_col + utinyint_col) from super', + 'select round(utinyint_col + utinyint_col) from t1', + 'select round(int_col - int_col) from super', + 'select round(int_col - int_col) from t1', + 'select round(bigint_col - bigint_col) from super', + 'select round(bigint_col - bigint_col) from t1', + 'select round(float_col - float_col) from super', + 'select round(float_col - float_col) from t1', + 'select round(double_col - double_col) from super', + 'select round(double_col - double_col) from t1', + 'select round(smallint_col - smallint_col) from super', + 'select round(smallint_col - smallint_col) from t1', + 'select round(tinyint_col - tinyint_col) from super', + 'select round(tinyint_col - tinyint_col) from t1', + 'select round(uint_col - uint_col) from super', + 'select round(uint_col - uint_col) from t1', + 'select round(ubigint_col - ubigint_col) from super', + 'select round(ubigint_col - ubigint_col) from t1', + 'select round(usmallint_col - usmallint_col) from super', + 'select round(usmallint_col - usmallint_col) from t1', + 'select round(utinyint_col - utinyint_col) from super', + 'select round(utinyint_col - utinyint_col) from t1', + 'select round(int_col * int_col) from super', + 'select round(int_col * int_col) from t1', + 'select round(bigint_col * bigint_col) from super', + 'select round(bigint_col * bigint_col) from t1', + 'select round(float_col * float_col) from super', + 'select round(float_col * float_col) from t1', + 'select round(double_col * double_col) from super', + 'select round(double_col * double_col) from t1', + 'select round(smallint_col * smallint_col) from super', + 'select round(smallint_col * smallint_col) from t1', + 'select round(tinyint_col * tinyint_col) from super', + 'select round(tinyint_col * tinyint_col) from t1', + 'select round(uint_col * uint_col) from super', + 'select round(uint_col * uint_col) from t1', + 'select round(ubigint_col * ubigint_col) from super', + 'select round(ubigint_col * ubigint_col) from t1', + 'select round(usmallint_col * usmallint_col) from super', + 'select round(usmallint_col * usmallint_col) from t1', + 'select round(utinyint_col * utinyint_col) from super', + 'select round(utinyint_col * utinyint_col) from t1', + 'select round(int_col / int_col) from super', + 'select round(int_col / int_col) from t1', + 'select round(bigint_col / bigint_col) from super', + 'select round(bigint_col / bigint_col) from t1', + 'select round(float_col / float_col) from super', + 'select round(float_col / float_col) from t1', + 'select round(double_col / double_col) from super', + 'select round(double_col / double_col) from t1', + 'select round(smallint_col / smallint_col) from super', + 'select round(smallint_col / smallint_col) from t1', + 'select round(tinyint_col / tinyint_col) from super', + 'select round(tinyint_col / tinyint_col) from t1', + 'select round(uint_col / uint_col) from super', + 'select round(uint_col / uint_col) from t1', + 'select round(ubigint_col / ubigint_col) from super', + 'select round(ubigint_col / ubigint_col) from t1', + 'select round(usmallint_col / usmallint_col) from super', + 'select round(usmallint_col / usmallint_col) from t1', + 'select round(utinyint_col / utinyint_col) from super', + 'select round(utinyint_col / utinyint_col) from t1', + 'select int_col, round(int_col), int_col from super', + 'select int_col, round(int_col), int_col from t1', + 'select bigint_col, round(bigint_col), bigint_col from super', + 'select bigint_col, round(bigint_col), bigint_col from t1', + 'select float_col, round(float_col), float_col from super', + 'select float_col, round(float_col), float_col from t1', + 'select double_col, round(double_col), double_col from super', + 'select double_col, round(double_col), double_col from t1', + 'select smallint_col, round(smallint_col), smallint_col from super', + 'select smallint_col, round(smallint_col), smallint_col from t1', + 'select tinyint_col, round(tinyint_col), tinyint_col from super', + 'select tinyint_col, round(tinyint_col), tinyint_col from t1', + 'select uint_col, round(uint_col), uint_col from super', + 'select uint_col, round(uint_col), uint_col from t1', + 'select ubigint_col, round(ubigint_col), ubigint_col from super', + 'select ubigint_col, round(ubigint_col), ubigint_col from t1', + 'select usmallint_col, round(usmallint_col), usmallint_col from super', + 'select usmallint_col, round(usmallint_col), usmallint_col from t1', + 'select utinyint_col, round(utinyint_col), utinyint_col from super', + 'select utinyint_col, round(utinyint_col), utinyint_col from t1', + 'select 1, round(int_col), 1 from super', + 'select 1, round(int_col), 1 from t1', + 'select 1, round(bigint_col), 1 from super', + 'select 1, round(bigint_col), 1 from t1', + 'select 1, round(float_col), 1 from super', + 'select 1, round(float_col), 1 from t1', + 'select 1, round(double_col), 1 from super', + 'select 1, round(double_col), 1 from t1', + 'select 1, round(smallint_col), 1 from super', + 'select 1, round(smallint_col), 1 from t1', + 'select 1, round(tinyint_col), 1 from super', + 'select 1, round(tinyint_col), 1 from t1', + 'select 1, round(uint_col), 1 from super', + 'select 1, round(uint_col), 1 from t1', + 'select 1, round(ubigint_col), 1 from super', + 'select 1, round(ubigint_col), 1 from t1', + 'select 1, round(usmallint_col), 1 from super', + 'select 1, round(usmallint_col), 1 from t1', + 'select 1, round(utinyint_col), 1 from super', + 'select 1, round(utinyint_col), 1 from t1', + 'select round(int_col) as anyName from super', + 'select round(int_col) as anyName from t1', + 'select round(bigint_col) as anyName from super', + 'select round(bigint_col) as anyName from t1', + 'select round(float_col) as anyName from super', + 'select round(float_col) as anyName from t1', + 'select round(double_col) as anyName from super', + 'select round(double_col) as anyName from t1', + 'select round(smallint_col) as anyName from super', + 'select round(smallint_col) as anyName from t1', + 'select round(tinyint_col) as anyName from super', + 'select round(tinyint_col) as anyName from t1', + 'select round(uint_col) as anyName from super', + 'select round(uint_col) as anyName from t1', + 'select round(ubigint_col) as anyName from super', + 'select round(ubigint_col) as anyName from t1', + 'select round(usmallint_col) as anyName from super', + 'select round(usmallint_col) as anyName from t1', + 'select round(utinyint_col) as anyName from super', + 'select round(utinyint_col) as anyName from t1'] + shouldPass2 = ['select round(super.int_col) from super', 'select round(super.int_col) from super, superb where super.ts = superb.ts and super.int_tag = superb.int_tag', @@ -1916,7 +1927,7 @@ class TDTestCase: 'select round(t1.usmallint_col) from t1', 'select round(t1.utinyint_col) from t1'] - + for s in range(len(select_command)): for f in range(len(from_command)): sql = "select " + select_command[s] + from_command[f] diff --git a/tests/script/fullGeneralSuite.sim b/tests/script/fullGeneralSuite.sim index a89c07aa5e9fff58a7e69e23ec3debc00f0e6241..54b8cbd652ae78f135a742716719aff3ec8e1bf3 100644 --- a/tests/script/fullGeneralSuite.sim +++ b/tests/script/fullGeneralSuite.sim @@ -39,6 +39,8 @@ run general/compute/sum.sim run general/compute/top.sim run general/compute/block_dist.sim run general/compute/scalar_pow.sim +run general/compute/scalar_triangle.sim +run general/compute/scalar_str_concat_len.sim run general/compute/table_group.sim run general/db/alter_option.sim run general/db/alter_tables_d2.sim @@ -141,6 +143,7 @@ run general/parser/groupby.sim run general/parser/top_groupby.sim run general/parser/tags_dynamically_specifiy.sim run general/parser/set_tag_vals.sim +run general/parser/scalar_expression.sim #unsupport run general/parser/repeatAlter.sim #unsupport run general/parser/slimit_alter_tags.sim run general/parser/precision_ns.sim diff --git a/tests/script/general/compute/scalar_str_concat_len.sim b/tests/script/general/compute/scalar_str_concat_len.sim new file mode 100644 index 0000000000000000000000000000000000000000..21bf762ea8725078d2cb3fbbb694e4573be9be03 --- /dev/null +++ b/tests/script/general/compute/scalar_str_concat_len.sim @@ -0,0 +1,807 @@ +system sh/stop_dnodes.sh + +system sh/deploy.sh -n dnode1 -i 1 +system sh/cfg.sh -n dnode1 -c walLevel -v 1 +system sh/exec.sh -n dnode1 -s start +sleep 500 +sql connect + +$dbPrefix = db +$tbPrefix = ct +$mtPrefix = st +$quote = ' +$tbNum = 2 +$rowNum = 50 + +print =============== step1 create stable/table +$i = 0 +$db = $dbPrefix . $i +$mt = $mtPrefix . $i + +sql drop database $db -x step1 +step1: +sql create database $db +sql use $db +sql create table $mt (ts timestamp, c1 int, c2 binary(10), c3 binary(30), c4 binary(40), c5 binary(50), c6 nchar(10), c7 nchar(20), c8 nchar(30), c9 nchar(40)) TAGS (tgcol int) +$i = 0 +while $i < $tbNum + $tb = $tbPrefix . $i + sql create table $tb using $mt tags( $i ) + + $x = 0 + + $z2 = $x . 2 + $y2 = $quote . $z2 + $y2 = $y2 . $quote + + $z3 = $x . 3 + $y3 = $quote . $z3 + $y3 = $y3 . $quote + + $z4 = $x . 4 + $y4 = $quote . $z4 + $y4 = $y4 . $quote + + $z5 = $x . 5 + $y5 = $quote . $z5 + $y5 = $y5 . $quote + + $z6 = $x . 6 + $y6 = $quote . $z6 + $y6 = $y6 . $quote + + $z7 = $x . 7 + $y7 = $quote . $z7 + $y7 = $y7 . $quote + + $z8 = $x . 8 + $y8 = $quote . $z8 + $y8 = $y8 . $quote + + $z9 = $x . 9 + $y9 = $quote . $z9 + $y9 = $y9 . $quote + + while $x < $rowNum + $cc = $x * 60000 + $ms = 1601481600000 + $cc + + sql insert into $tb values ($ms , $x , $y2 , $y3 , $y4 , $y5 , $y6 , $y7 , $y8 , $y9 ) + $x = $x + 1 + $z2 = $x . 2 + $y2 = $quote . $z2 + $y2 = $y2 . $quote + + $z3 = $x . 3 + $y3 = $quote . $z3 + $y3 = $y3 . $quote + + $z4 = $x . 4 + $y4 = $quote . $z4 + $y4 = $y4 . $quote + + $z5 = $x . 5 + $y5 = $quote . $z5 + $y5 = $y5 . $quote + + $z6 = $x . 6 + $y6 = $quote . $z6 + $y6 = $y6 . $quote + + $z7 = $x . 7 + $y7 = $quote . $z7 + $y7 = $y7 . $quote + + $z8 = $x . 8 + $y8 = $quote . $z8 + $y8 = $y8 . $quote + + $z9 = $x . 9 + $y9 = $quote . $z9 + $y9 = $y9 . $quote + endw + + $i = $i + 1 +endw + +print ================= step2 +$i = 1 +$tb = $tbPrefix . $i +$stb = $mtPrefix . 0 + +print sql select concat(c2, c3, c4, c5) from $tb +sql select concat(c2, c3, c4, c5) from $tb +print $data00 +if $data00 != 02030405 then + return -1 +endi + +print sql select concat_ws('data',c2,c3,c4,c5) from $tb +sql select concat_ws('data',c2,c3,c4,c5) from $tb +print $data00 + +if $data00 != 02data03data04data05 then + return -1 +endi +print sql select concat(c6, c7, c8, c9) from $tb +sql select concat(c6, c7, c8, c9) from $tb +print $data00 +if $data00 != 06070809 then + return -1 +endi + +print sql select concat_ws('data' ,c6,c7,c8,c9) from $tb +sql select concat_ws('data' ,c6,c7,c8,c9) from $tb +print $data00 + +if $data00 != 06data07data08data09 then + return -1 +endi + +print sql select length(concat(c2, c3, c4, c5)) from $tb +sql select length(concat(c2, c3, c4, c5)) from $tb +print $data00 +if $data00 != 8 then + return -1 +endi + +print sql select char_length(concat(c2, c3, c4, c5)) from $tb +sql select char_length(concat(c2, c3, c4, c5)) from $tb +print $data00 +if $data00 != 8 then + return -1 +endi + +print sql select length(concat_ws('data',c2,c3,c4,c5)) from $tb +sql select length(concat_ws('data',c2,c3,c4,c5)) from $tb +print $data00 + +if $data00 != 20 then + return -1 +endi + +print sql select char_length(concat_ws('data',c2,c3,c4,c5)) from $tb +sql select char_length(concat_ws('data',c2,c3,c4,c5)) from $tb +print $data00 + +if $data00 != 20 then + return -1 +endi + +print sql select length(concat(c6, c7, c8, c9)) from $tb +sql select length(concat(c6, c7, c8, c9)) from $tb +print $data00 +if $data00 != 32 then + return -1 +endi + +print sql select char_length(concat(c6, c7, c8, c9)) from $tb +sql select char_length(concat(c6, c7, c8, c9)) from $tb +print $data00 +if $data00 != 8 then + return -1 +endi + +print sql select length(concat_ws('data' ,c6,c7,c8,c9)) from $tb +sql select length(concat_ws('data' ,c6,c7,c8,c9)) from $tb +print $data00 + +if $data00 != 80 then + return -1 +endi + +print sql select char_length(concat_ws('data', c6,c7,c8,c9)) from $tb +sql select char_length(concat_ws('data', c6, c7, c8, c9)) from $tb +print $data00 +if $data00 != 20 then + return -1 +endi + +print sql_error select concat(c1, c2, c3, c4, c5) from $tb +sql_error select concat(c1, c2, c3, c4, c5) from $tb +print sql_error select concat_ws('data',c1,c2,c3,c4,c5) from $tb +sql_error select concat_ws('data',c1,c2,c3,c4,c5) from $tb + +print ===============> step 3 sql_error stable, group by, window +sql_error select concat(c2) from $stb group by tbname; + +sql_error select concat(c2) from $stb group by tgcol; + +sql_error select concat(c2) from $stb group by c3; + +sql_error select concat(c2) from $stb interval(1m); + +sql_error select concat(c2) from $stb state_window(c7); + +sql_error select concat(c2) from $tb state_window(c7); + +sql_error select concat(c2) from $stb session(ts, 30s); + +sql_error select concat(c2) from $tb session(ts, 30s); + +sql_error select concat(c2) from $stb slimit 2; + +sql_error select concat(c2) from $stb interval(1m) slimit 2; + +sql_error select length(c2) from $stb group by tbname; + +sql_error select length(c2) from $stb group by tgcol; + +sql_error select length(c2) from $stb group by c3; + +sql_error select length(c2) from $stb interval(1m); + +sql_error select length(c2) from $stb state_window(c7); + +sql_error select length(c2) from $tb state_window(c7); + +sql_error select length(c2) from $stb session(ts, 30s); + +sql_error select length(c2) from $tb session(ts, 30s); + +sql_error select length(c2) from $stb slimit 2; + +sql_error select length(c2) from $stb interval(1m) slimit 2; + +sql_error select concat_ws(c2) from $stb group by tbname; + +sql_error select concat_ws(c2) from $stb group by tgcol; + +sql_error select concat_ws(c2) from $stb group by c3; + +sql_error select concat_ws(c2) from $stb interval(1m); + +sql_error select concat_ws(c2) from $stb state_window(c7); + +sql_error select concat_ws(c2) from $tb state_window(c7); + +sql_error select concat_ws(c2) from $stb session(ts, 30s); + +sql_error select concat_ws(c2) from $tb session(ts, 30s); + +sql_error select concat_ws(c2) from $stb slimit 2; + +sql_error select concat_ws(c2) from $stb interval(1m) slimit 2; +print =============== trival test + +print execute sql select concat(c2,c3),concat(c2,c3,c4),concat(c2,c3,c4,c5) from ct1 + +sql select concat(c2,c3),concat(c2,c3,c4),concat(c2,c3,c4,c5) from ct1 + +if $rows != 50 then + return -1 +endi +if $data00 != @0203@ then + return -1 +endi +if $data01 != @020304@ then + return -1 +endi +if $data02 != @02030405@ then + return -1 +endi +if $data10 != @1213@ then + return -1 +endi +if $data11 != @121314@ then + return -1 +endi +if $data12 != @12131415@ then + return -1 +endi +print execute sql select concat('taos',c2,c3),concat('taos',c2,c4),concat('taos',c2,c5),concat('taos',c3,c4),concat('taos',c3,c5) from ct1 + +sql select concat('taos',c2,c3),concat('taos',c2,c4),concat('taos',c2,c5),concat('taos',c3,c4),concat('taos',c3,c5) from ct1 + +if $rows != 50 then + return -1 +endi +if $data00 != @taos0203@ then + return -1 +endi +if $data01 != @taos0204@ then + return -1 +endi +if $data02 != @taos0205@ then + return -1 +endi +if $data03 != @taos0304@ then + return -1 +endi +if $data04 != @taos0305@ then + return -1 +endi +if $data10 != @taos1213@ then + return -1 +endi +if $data11 != @taos1214@ then + return -1 +endi +if $data12 != @taos1215@ then + return -1 +endi +if $data13 != @taos1314@ then + return -1 +endi +if $data14 != @taos1315@ then + return -1 +endi +print execute sql select concat(c6,c7,'taos'),concat(c6,c8,'taos'),concat(c6,c9,'taos'),concat(c7,c8,'taos'),concat(c7,c9,'taos') from ct1 + +sql select concat(c6,c7,'taos'),concat(c6,c8,'taos'),concat(c6,c9,'taos'),concat(c7,c8,'taos'),concat(c7,c9,'taos') from ct1 + +if $rows != 50 then + return -1 +endi +if $data00 != @0607taos@ then + return -1 +endi +if $data01 != @0608taos@ then + return -1 +endi +if $data02 != @0609taos@ then + return -1 +endi +if $data03 != @0708taos@ then + return -1 +endi +if $data04 != @0709taos@ then + return -1 +endi +if $data10 != @1617taos@ then + return -1 +endi +if $data11 != @1618taos@ then + return -1 +endi +if $data12 != @1619taos@ then + return -1 +endi +if $data13 != @1718taos@ then + return -1 +endi +if $data14 != @1719taos@ then + return -1 +endi +print execute sql select concat('data',c7,'taos'),concat('data',c8,'taos'),concat('data',c9,'taos'),concat(c7,c8,'taos'),concat(c7,c9,'taos') from ct1 + +sql select concat('data',c7,'taos'),concat('data',c8,'taos'),concat('data',c9,'taos'),concat(c7,c8,'taos'),concat(c7,c9,'taos') from ct1 + +if $rows != 50 then + return -1 +endi +if $data00 != @data07taos@ then + return -1 +endi +if $data01 != @data08taos@ then + return -1 +endi +if $data02 != @data09taos@ then + return -1 +endi +if $data03 != @0708taos@ then + return -1 +endi +if $data04 != @0709taos@ then + return -1 +endi +if $data10 != @data17taos@ then + return -1 +endi +if $data11 != @data18taos@ then + return -1 +endi +if $data12 != @data19taos@ then + return -1 +endi +if $data13 != @1718taos@ then + return -1 +endi +if $data14 != @1719taos@ then + return -1 +endi +print execute sql select concat_ws('jeff',c2,c3),concat_ws('jeff',c2,c3,c4),concat_ws('jeff',c2,c3,c4,c5) from ct1 + +sql select concat_ws('jeff',c2,c3),concat_ws('jeff',c2,c3,c4),concat_ws('jeff',c2,c3,c4,c5) from ct1 + +if $rows != 50 then + return -1 +endi +if $data00 != @02jeff03@ then + return -1 +endi +if $data01 != @02jeff03jeff04@ then + return -1 +endi +if $data02 != @02jeff03jeff04jeff05@ then + return -1 +endi +if $data10 != @12jeff13@ then + return -1 +endi +if $data11 != @12jeff13jeff14@ then + return -1 +endi +if $data12 != @12jeff13jeff14jeff15@ then + return -1 +endi +print execute sql select concat_ws('jeff','taos',c2,c3),concat_ws('jeff','taos',c2,c4),concat_ws('jeff','taos',c2,c5),concat_ws('jeff','taos',c3,c4),concat_ws('jeff','taos',c3,c5) from ct1 + +sql select concat_ws('jeff','taos',c2,c3),concat_ws('jeff','taos',c2,c4),concat_ws('jeff','taos',c2,c5),concat_ws('jeff','taos',c3,c4),concat_ws('jeff','taos',c3,c5) from ct1 + +if $rows != 50 then + return -1 +endi +if $data00 != @taosjeff02jeff03@ then + return -1 +endi +if $data01 != @taosjeff02jeff04@ then + return -1 +endi +if $data02 != @taosjeff02jeff05@ then + return -1 +endi +if $data03 != @taosjeff03jeff04@ then + return -1 +endi +if $data04 != @taosjeff03jeff05@ then + return -1 +endi +if $data10 != @taosjeff12jeff13@ then + return -1 +endi +if $data11 != @taosjeff12jeff14@ then + return -1 +endi +if $data12 != @taosjeff12jeff15@ then + return -1 +endi +if $data13 != @taosjeff13jeff14@ then + return -1 +endi +if $data14 != @taosjeff13jeff15@ then + return -1 +endi +print execute sql select concat_ws('jeff','data',c3),concat_ws('jeff','data',c3,c4),concat_ws('jeff','data',c3,c4,c5) from ct1 + +sql select concat_ws('jeff','data',c3),concat_ws('jeff','data',c3,c4),concat_ws('jeff','data',c3,c4,c5) from ct1 + +if $rows != 50 then + return -1 +endi +if $data00 != @datajeff03@ then + return -1 +endi +if $data01 != @datajeff03jeff04@ then + return -1 +endi +if $data02 != @datajeff03jeff04jeff05@ then + return -1 +endi +if $data10 != @datajeff13@ then + return -1 +endi +if $data11 != @datajeff13jeff14@ then + return -1 +endi +if $data12 != @datajeff13jeff14jeff15@ then + return -1 +endi +print execute sql select concat_ws('jeff','data',c7,'taos'),concat_ws('jeff','data',c8,'taos'),concat_ws('jeff','data',c9,'taos'),concat_ws('jeff',c7,c8,'taos'),concat_ws('jeff',c7,c9,'taos') from ct1 + +sql select concat_ws('jeff','data',c7,'taos'),concat_ws('jeff','data',c8,'taos'),concat_ws('jeff','data',c9,'taos'),concat_ws('jeff',c7,c8,'taos'),concat_ws('jeff',c7,c9,'taos') from ct1 + +if $rows != 50 then + return -1 +endi +if $data00 != @datajeff07jefftaos@ then + return -1 +endi +if $data01 != @datajeff08jefftaos@ then + return -1 +endi +if $data02 != @datajeff09jefftaos@ then + return -1 +endi +if $data03 != @07jeff08jefftaos@ then + return -1 +endi +if $data04 != @07jeff09jefftaos@ then + return -1 +endi +if $data10 != @datajeff17jefftaos@ then + return -1 +endi +if $data11 != @datajeff18jefftaos@ then + return -1 +endi +if $data12 != @datajeff19jefftaos@ then + return -1 +endi +if $data13 != @17jeff18jefftaos@ then + return -1 +endi +if $data14 != @17jeff19jefftaos@ then + return -1 +endi +print execute sql select length(concat(c2,c3)),length(concat(c2,c3,c4)),length(concat(c2,c3,c4,c5)) from ct1 + +sql select length(concat(c2,c3)),length(concat(c2,c3,c4)),length(concat(c2,c3,c4,c5)) from ct1 + +if $rows != 50 then + return -1 +endi +if $data00 != @4@ then + return -1 +endi +if $data01 != @6@ then + return -1 +endi +if $data02 != @8@ then + return -1 +endi +if $data10 != @4@ then + return -1 +endi +if $data11 != @6@ then + return -1 +endi +if $data12 != @8@ then + return -1 +endi +print execute sql select length(concat(c6,c7,'taos')),length(concat(c6,c8,'taos')),length(concat(c6,c9,'taos')),length(concat(c7,c8,'taos')),length(concat(c7,c9,'taos')) from ct1 + +sql select length(concat(c6,c7,'taos')),length(concat(c6,c8,'taos')),length(concat(c6,c9,'taos')),length(concat(c7,c8,'taos')),length(concat(c7,c9,'taos')) from ct1 + +if $rows != 50 then + return -1 +endi +if $data00 != @32@ then + return -1 +endi +if $data01 != @32@ then + return -1 +endi +if $data02 != @32@ then + return -1 +endi +if $data03 != @32@ then + return -1 +endi +if $data04 != @32@ then + return -1 +endi +if $data10 != @32@ then + return -1 +endi +if $data11 != @32@ then + return -1 +endi +if $data12 != @32@ then + return -1 +endi +if $data13 != @32@ then + return -1 +endi +if $data14 != @32@ then + return -1 +endi +print execute sql select length(concat_ws('jeff','taos',c2,c3)),length(concat_ws('jeff','taos',c2,c4)),length(concat_ws('jeff','taos',c2,c5)),length(concat_ws('jeff','taos',c3,c4)),length(concat_ws('jeff','taos',c3,c5)) from ct1 + +sql select length(concat_ws('jeff','taos',c2,c3)),length(concat_ws('jeff','taos',c2,c4)),length(concat_ws('jeff','taos',c2,c5)),length(concat_ws('jeff','taos',c3,c4)),length(concat_ws('jeff','taos',c3,c5)) from ct1 + +if $rows != 50 then + return -1 +endi +if $data00 != @16@ then + return -1 +endi +if $data01 != @16@ then + return -1 +endi +if $data02 != @16@ then + return -1 +endi +if $data03 != @16@ then + return -1 +endi +if $data04 != @16@ then + return -1 +endi +if $data10 != @16@ then + return -1 +endi +if $data11 != @16@ then + return -1 +endi +if $data12 != @16@ then + return -1 +endi +if $data13 != @16@ then + return -1 +endi +if $data14 != @16@ then + return -1 +endi +print execute sql select length(concat_ws('jeff',c6,c7,'taos')),length(concat_ws('jeff',c6,c8,'taos')),length(concat_ws('jeff',c6,c9,'taos')),length(concat_ws('jeff',c7,c8,'taos')),length(concat_ws('jeff',c7,c9,'taos')) from ct1 + +sql select length(concat_ws('jeff',c6,c7,'taos')),length(concat_ws('jeff',c6,c8,'taos')),length(concat_ws('jeff',c6,c9,'taos')),length(concat_ws('jeff',c7,c8,'taos')),length(concat_ws('jeff',c7,c9,'taos')) from ct1 + +if $rows != 50 then + return -1 +endi +if $data00 != @64@ then + return -1 +endi +if $data01 != @64@ then + return -1 +endi +if $data02 != @64@ then + return -1 +endi +if $data03 != @64@ then + return -1 +endi +if $data04 != @64@ then + return -1 +endi +if $data10 != @64@ then + return -1 +endi +if $data11 != @64@ then + return -1 +endi +if $data12 != @64@ then + return -1 +endi +if $data13 != @64@ then + return -1 +endi +if $data14 != @64@ then + return -1 +endi +print execute sql select char_length(concat(c2,'taos',c3)),char_length(concat(c2,'taos',c4)),char_length(concat(c2,'taos',c5)),char_length(concat(c3,'taos',c4)),char_length(concat(c3,'taos',c5)) from ct1 + +sql select char_length(concat(c2,'taos',c3)),char_length(concat(c2,'taos',c4)),char_length(concat(c2,'taos',c5)),char_length(concat(c3,'taos',c4)),char_length(concat(c3,'taos',c5)) from ct1 + +if $rows != 50 then + return -1 +endi +if $data00 != @8@ then + return -1 +endi +if $data01 != @8@ then + return -1 +endi +if $data02 != @8@ then + return -1 +endi +if $data03 != @8@ then + return -1 +endi +if $data04 != @8@ then + return -1 +endi +if $data10 != @8@ then + return -1 +endi +if $data11 != @8@ then + return -1 +endi +if $data12 != @8@ then + return -1 +endi +if $data13 != @8@ then + return -1 +endi +if $data14 != @8@ then + return -1 +endi +print execute sql select char_length(concat(c6,'taos')),char_length(concat(c7,'taos')),char_length(concat(c8,'taos')),char_length(concat(c9,'taos')) from ct1 + +sql select char_length(concat(c6,'taos')),char_length(concat(c7,'taos')),char_length(concat(c8,'taos')),char_length(concat(c9,'taos')) from ct1 + +if $rows != 50 then + return -1 +endi +if $data00 != @6@ then + return -1 +endi +if $data01 != @6@ then + return -1 +endi +if $data02 != @6@ then + return -1 +endi +if $data03 != @6@ then + return -1 +endi +if $data10 != @6@ then + return -1 +endi +if $data11 != @6@ then + return -1 +endi +if $data12 != @6@ then + return -1 +endi +if $data13 != @6@ then + return -1 +endi +print execute sql select char_length(concat_ws('jeff',c2,'taos',c3)),char_length(concat_ws('jeff',c2,'taos',c4)),char_length(concat_ws('jeff',c2,'taos',c5)),char_length(concat_ws('jeff',c3,'taos',c4)),char_length(concat_ws('jeff',c3,'taos',c5)) from ct1 + +sql select char_length(concat_ws('jeff',c2,'taos',c3)),char_length(concat_ws('jeff',c2,'taos',c4)),char_length(concat_ws('jeff',c2,'taos',c5)),char_length(concat_ws('jeff',c3,'taos',c4)),char_length(concat_ws('jeff',c3,'taos',c5)) from ct1 + +if $rows != 50 then + return -1 +endi +if $data00 != @16@ then + return -1 +endi +if $data01 != @16@ then + return -1 +endi +if $data02 != @16@ then + return -1 +endi +if $data03 != @16@ then + return -1 +endi +if $data04 != @16@ then + return -1 +endi +if $data10 != @16@ then + return -1 +endi +if $data11 != @16@ then + return -1 +endi +if $data12 != @16@ then + return -1 +endi +if $data13 != @16@ then + return -1 +endi +if $data14 != @16@ then + return -1 +endi +print execute sql select char_length(concat_ws('jeff',c6,'taos')),char_length(concat_ws('jeff',c7,'taos')),char_length(concat_ws('jeff',c8,'taos')),char_length(concat_ws('jeff',c9,'taos')) from ct1 + +sql select char_length(concat_ws('jeff',c6,'taos')),char_length(concat_ws('jeff',c7,'taos')),char_length(concat_ws('jeff',c8,'taos')),char_length(concat_ws('jeff',c9,'taos')) from ct1 + +if $rows != 50 then + return -1 +endi +if $data00 != @10@ then + return -1 +endi +if $data01 != @10@ then + return -1 +endi +if $data02 != @10@ then + return -1 +endi +if $data03 != @10@ then + return -1 +endi +if $data10 != @10@ then + return -1 +endi +if $data11 != @10@ then + return -1 +endi +if $data12 != @10@ then + return -1 +endi +if $data13 != @10@ then + return -1 +endi +print =============== clear +#sql drop database $db +#sql show databases +#if $rows != 0 then +# return -1 +#endi + +#system sh/exec.sh -n dnode1 -s stop -x SIGINT + diff --git a/tests/script/general/compute/scalar_triangle.sim b/tests/script/general/compute/scalar_triangle.sim new file mode 100644 index 0000000000000000000000000000000000000000..e474a6ae54d1da7a67bb419af6d07cadbca74f52 --- /dev/null +++ b/tests/script/general/compute/scalar_triangle.sim @@ -0,0 +1,1579 @@ +system sh/stop_dnodes.sh + +system sh/deploy.sh -n dnode1 -i 1 +system sh/cfg.sh -n dnode1 -c walLevel -v 1 +system sh/exec.sh -n dnode1 -s start +sleep 500 +sql connect + +$dbPrefix = db +$tbPrefix = ct +$mtPrefix = st +$tbNum = 2 +$rowNum = 50 + +print =============== step1 create stable/table +$i = 0 +$db = $dbPrefix . $i +$mt = $mtPrefix . $i + +sql drop database $db -x step1 +step1: +sql create database $db +sql use $db +sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 nchar(5), c9 binary(10)) TAGS (tgcol int) +$i = 0 +while $i < $tbNum + $tb = $tbPrefix . $i + sql create table $tb using $mt tags( $i ) + + $x = 0 + $y = 0.25 + + while $x < $rowNum + $cc = $x * 60000 + $ms = 1601481600000 + $cc + sql insert into $tb values ($ms , $x , $y , $x , $x , $x , $y , $x , $x , $x ) + $x = $x + 1 + $y = $y + 1 + endw + + $i = $i + 1 +endw + +print ================= step2 +$i = 1 +$tb = $tbPrefix . $i +$stb = $mtPrefix . 0 + + +print execute sql select c1, sin(c1), cos(c1), tan(c1), asin(c1), acos(c1), atan(c1) from ct1 + +sql select c1, sin(c1), cos(c1), tan(c1), asin(c1), acos(c1), atan(c1) from ct1 + +if $rows != 50 then + return -1 +endi +if $data00 != @0@ then + return -1 +endi +if $data01 != @0.000000000@ then + return -1 +endi +if $data02 != @1.000000000@ then + return -1 +endi +if $data03 != @0.000000000@ then + return -1 +endi +if $data04 != @0.000000000@ then + return -1 +endi +if $data05 != @1.570796327@ then + return -1 +endi +if $data06 != @0.000000000@ then + return -1 +endi +if $data10 != @1@ then + return -1 +endi +if $data11 != @0.841470985@ then + return -1 +endi +if $data12 != @0.540302306@ then + return -1 +endi +if $data13 != @1.557407725@ then + return -1 +endi +if $data14 != @1.570796327@ then + return -1 +endi +if $data15 != @0.000000000@ then + return -1 +endi +if $data16 != @0.785398163@ then + return -1 +endi +if $data20 != @2@ then + return -1 +endi +if $data21 != @0.909297427@ then + return -1 +endi +if $data22 != @-0.416146837@ then + return -1 +endi +if $data23 != @-2.185039863@ then + return -1 +endi +if $data26 != @1.107148718@ then + return -1 +endi +if $data30 != @3@ then + return -1 +endi +if $data31 != @0.141120008@ then + return -1 +endi +if $data32 != @-0.989992497@ then + return -1 +endi +if $data33 != @-0.142546543@ then + return -1 +endi +if $data36 != @1.249045772@ then + return -1 +endi +if $data40 != @4@ then + return -1 +endi +if $data41 != @-0.756802495@ then + return -1 +endi +if $data42 != @-0.653643621@ then + return -1 +endi +if $data43 != @1.157821282@ then + return -1 +endi +if $data46 != @1.325817664@ then + return -1 +endi +if $data50 != @5@ then + return -1 +endi +if $data51 != @-0.958924275@ then + return -1 +endi +if $data52 != @0.283662185@ then + return -1 +endi +if $data53 != @-3.380515006@ then + return -1 +endi +if $data56 != @1.373400767@ then + return -1 +endi +if $data60 != @6@ then + return -1 +endi +if $data61 != @-0.279415498@ then + return -1 +endi +if $data62 != @0.960170287@ then + return -1 +endi +if $data63 != @-0.291006191@ then + return -1 +endi +if $data66 != @1.405647649@ then + return -1 +endi +if $data70 != @7@ then + return -1 +endi +if $data71 != @0.656986599@ then + return -1 +endi +if $data72 != @0.753902254@ then + return -1 +endi +if $data73 != @0.871447983@ then + return -1 +endi +if $data76 != @1.428899272@ then + return -1 +endi +if $data80 != @8@ then + return -1 +endi +if $data81 != @0.989358247@ then + return -1 +endi +if $data82 != @-0.145500034@ then + return -1 +endi +if $data83 != @-6.799711455@ then + return -1 +endi +if $data86 != @1.446441332@ then + return -1 +endi +if $data90 != @9@ then + return -1 +endi +if $data91 != @0.412118485@ then + return -1 +endi +if $data92 != @-0.911130262@ then + return -1 +endi +if $data93 != @-0.452315659@ then + return -1 +endi +if $data96 != @1.460139106@ then + return -1 +endi +print execute sql select c1, sin(c2)+2, cos(c2)+2, cos(pow(c2,2)+2), tan(pow(c2,3)+log(c3, 2)+pow(c5,2)) as v4, asin(pow(c4, 4.5)+pow(c3, 2)), acos(log(c1,2)+log(c3,4)+pow(c6,2.8)+2) as v6 from ct1 where ts == 1601481600000 + +sql select c1, sin(c2)+2, cos(c2)+2, cos(pow(c2,2)+2), tan(pow(c2,3)+log(c3, 2)+pow(c5,2)) as v4, asin(pow(c4, 4.5)+pow(c3, 2)), acos(log(c1,2)+log(c3,4)+pow(c6,2.8)+2) as v6 from ct1 where ts == 1601481600000 + +if $rows != 1 then + return -1 +endi +if $data00 != @0@ then + return -1 +endi +if $data01 != @2.247403959@ then + return -1 +endi +if $data02 != @2.968912422@ then + return -1 +endi +if $data03 != @-0.472128411@ then + return -1 +endi +if $data05 != @0.000000000@ then + return -1 +endi +print execute sql select c1, sin(c2), cos(c1+2), tan(c2+2)+2, sin(c2+3)+cos(c3+2)+tan(c5+2) as v4, sin(c4+4.5)+tan(c3+2), sin(c1+2)+cos(c3+4)+acos(c6+2.8)+2 as v6 from st0 where ts == 1601481600000 + +sql select c1, sin(c2), cos(c1+2), tan(c2+2)+2, sin(c2+3)+cos(c3+2)+tan(c5+2) as v4, sin(c4+4.5)+tan(c3+2), sin(c1+2)+cos(c3+4)+acos(c6+2.8)+2 as v6 from st0 where ts == 1601481600000 + +if $rows != 2 then + return -1 +endi +if $data00 != @0@ then + return -1 +endi +if $data01 != @0.247403959@ then + return -1 +endi +if $data02 != @-0.416146837@ then + return -1 +endi +if $data03 != @0.761372384@ then + return -1 +endi +if $data04 != @-2.709381834@ then + return -1 +endi +if $data05 != @-3.162569981@ then + return -1 +endi +if $data10 != @0@ then + return -1 +endi +if $data11 != @0.247403959@ then + return -1 +endi +if $data12 != @-0.416146837@ then + return -1 +endi +if $data13 != @0.761372384@ then + return -1 +endi +if $data14 != @-2.709381834@ then + return -1 +endi +if $data15 != @-3.162569981@ then + return -1 +endi +print execute sql select c1, tan(c2+ 2), sin(pow(c1,2)), cos(pow(c2,2)+2), tan(pow(c2,3)+log(c3, 2)+pow(c5,2)) as v4, asin(pow(c4, 4.5)+pow(c3, 2)), acos(log(c1,2)+log(c3,4)+pow(c6,2.8)+2) as v6 from st0 where c1 == 0 + +sql select c1, tan(c2+ 2), sin(pow(c1,2)), cos(pow(c2,2)+2), tan(pow(c2,3)+log(c3, 2)+pow(c5,2)) as v4, asin(pow(c4, 4.5)+pow(c3, 2)), acos(log(c1,2)+log(c3,4)+pow(c6,2.8)+2) as v6 from st0 where c1 == 0 + +if $rows != 2 then + return -1 +endi +if $data00 != @0@ then + return -1 +endi +if $data01 != @-1.238627616@ then + return -1 +endi +if $data02 != @0.000000000@ then + return -1 +endi +if $data03 != @-0.472128411@ then + return -1 +endi +if $data05 != @0.000000000@ then + return -1 +endi +if $data10 != @0@ then + return -1 +endi +if $data11 != @-1.238627616@ then + return -1 +endi +if $data12 != @0.000000000@ then + return -1 +endi +if $data13 != @-0.472128411@ then + return -1 +endi +if $data15 != @0.000000000@ then + return -1 +endi +print execute sql select c1, atan(c2+2), asin(c1+2), acos(c2+c1)+2, acos(c2+c3)+asin(c3+c2)+pow(c5,2) as v4, acos(c4/4.5)+asin(c3-2), asin(c1/2)+log(c3,c4)+pow(c6, 2.8)+2 as v6 from st0 where c1 == 0 + +sql select c1, atan(c2+2), asin(c1+2), acos(c2+c1)+2, acos(c2+c3)+asin(c3+c2)+pow(c5,2) as v4, acos(c4/4.5)+asin(c3-2), asin(c1/2)+log(c3,c4)+pow(c6, 2.8)+2 as v6 from st0 where c1 == 0 + +if $rows != 2 then + return -1 +endi +if $data00 != @0@ then + return -1 +endi +if $data01 != @1.152571997@ then + return -1 +endi +if $data03 != @3.318116072@ then + return -1 +endi +if $data04 != @1.570796327@ then + return -1 +endi +if $data10 != @0@ then + return -1 +endi +if $data11 != @1.152571997@ then + return -1 +endi +if $data13 != @3.318116072@ then + return -1 +endi +if $data14 != @1.570796327@ then + return -1 +endi +print execute sql select c1, cos(c2+2), cos(ceil(pow(c1,2))), sin(floor(pow(c2,2)+2)), sin(ceil(c2)+floor(c3+c2)+round(c5+c2)) as v4, atan(pow(c4, 4.5)+pow(c3, 2)), tan(log(c1,2)+cos(c3+4)+pow(c6,2.8)+2) as v6 from st0 order by ts desc + +sql select c1, cos(c2+2), cos(ceil(pow(c1,2))), sin(floor(pow(c2,2)+2)), sin(ceil(c2)+floor(c3+c2)+round(c5+c2)) as v4, atan(pow(c4, 4.5)+pow(c3, 2)), tan(log(c1,2)+cos(c3+4)+pow(c6,2.8)+2) as v6 from st0 order by ts desc + +if $rows != 100 then + return -1 +endi +if $data00 != @49@ then + return -1 +endi +if $data01 != @0.742154197@ then + return -1 +endi +if $data02 != @0.679868770@ then + return -1 +endi +if $data03 != @0.313028384@ then + return -1 +endi +if $data04 != @0.314456085@ then + return -1 +endi +if $data05 != @1.570796302@ then + return -1 +endi +if $data06 != @0.036525682@ then + return -1 +endi +if $data10 != @49@ then + return -1 +endi +if $data11 != @0.742154197@ then + return -1 +endi +if $data12 != @0.679868770@ then + return -1 +endi +if $data13 != @0.313028384@ then + return -1 +endi +if $data14 != @0.314456085@ then + return -1 +endi +if $data15 != @1.570796302@ then + return -1 +endi +if $data16 != @0.036525682@ then + return -1 +endi +if $data20 != @48@ then + return -1 +endi +if $data21 != @0.964966028@ then + return -1 +endi +if $data22 != @-0.350599733@ then + return -1 +endi +if $data23 != @0.070932648@ then + return -1 +endi +if $data24 != @0.146014414@ then + return -1 +endi +if $data25 != @1.570796300@ then + return -1 +endi +if $data26 != @-2.376507095@ then + return -1 +endi +if $data30 != @48@ then + return -1 +endi +if $data31 != @0.964966028@ then + return -1 +endi +if $data32 != @-0.350599733@ then + return -1 +endi +if $data33 != @0.070932648@ then + return -1 +endi +if $data34 != @0.146014414@ then + return -1 +endi +if $data35 != @1.570796300@ then + return -1 +endi +if $data36 != @-2.376507095@ then + return -1 +endi +if $data40 != @47@ then + return -1 +endi +if $data41 != @0.300592544@ then + return -1 +endi +if $data42 != @-0.895890607@ then + return -1 +endi +if $data43 != @-0.629747508@ then + return -1 +endi +if $data44 != @-0.012630495@ then + return -1 +endi +if $data45 != @1.570796297@ then + return -1 +endi +if $data46 != @-0.760993034@ then + return -1 +endi +if $data50 != @47@ then + return -1 +endi +if $data51 != @0.300592544@ then + return -1 +endi +if $data52 != @-0.895890607@ then + return -1 +endi +if $data53 != @-0.629747508@ then + return -1 +endi +if $data54 != @-0.012630495@ then + return -1 +endi +if $data55 != @1.570796297@ then + return -1 +endi +if $data56 != @-0.760993034@ then + return -1 +endi +if $data60 != @46@ then + return -1 +endi +if $data61 != @-0.640144339@ then + return -1 +endi +if $data62 != @0.136916383@ then + return -1 +endi +if $data63 != @0.536725534@ then + return -1 +endi +if $data64 != @0.999302812@ then + return -1 +endi +if $data65 != @1.570796294@ then + return -1 +endi +if $data66 != @-1.929269971@ then + return -1 +endi +if $data70 != @46@ then + return -1 +endi +if $data71 != @-0.640144339@ then + return -1 +endi +if $data72 != @0.136916383@ then + return -1 +endi +if $data73 != @0.536725534@ then + return -1 +endi +if $data74 != @0.999302812@ then + return -1 +endi +if $data75 != @1.570796294@ then + return -1 +endi +if $data76 != @-1.929269971@ then + return -1 +endi +if $data80 != @45@ then + return -1 +endi +if $data81 != @-0.992335469@ then + return -1 +endi +if $data82 != @-0.241134582@ then + return -1 +endi +if $data83 != @-0.623130100@ then + return -1 +endi +if $data84 != @-0.861031953@ then + return -1 +endi +if $data85 != @1.570796290@ then + return -1 +endi +if $data86 != @-7.205947409@ then + return -1 +endi +if $data90 != @45@ then + return -1 +endi +if $data91 != @-0.992335469@ then + return -1 +endi +if $data92 != @-0.241134582@ then + return -1 +endi +if $data93 != @-0.623130100@ then + return -1 +endi +if $data94 != @-0.861031953@ then + return -1 +endi +if $data95 != @1.570796290@ then + return -1 +endi +if $data96 != @-7.205947409@ then + return -1 +endi +print execute sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5+c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from ct1 order by ts limit 2; + +sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5+c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from ct1 order by ts limit 2; + +if $rows != 2 then + return -1 +endi +if $data00 != @0@ then + return -1 +endi +if $data01 != @0.778073197@ then + return -1 +endi +if $data02 != @0.614300282@ then + return -1 +endi +if $data03 != @3.203726628@ then + return -1 +endi +if $data05 != @0.022469882@ then + return -1 +endi +if $data10 != @1@ then + return -1 +endi +if $data11 != @0.141120008@ then + return -1 +endi +if $data12 != @0.666366745@ then + return -1 +endi +if $data13 != @1.558041126@ then + return -1 +endi +if $data14 != @2.154346269@ then + return -1 +endi +if $data15 != @0.172042236@ then + return -1 +endi +print execute sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from st0 order by ts desc) + +sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from st0 order by ts desc) + +if $rows != 100 then + return -1 +endi +if $data00 != @49@ then + return -1 +endi +if $data01 != @0.670229176@ then + return -1 +endi +if $data02 != @0.992374553@ then + return -1 +endi +if $data03 != @0.929814367@ then + return -1 +endi +if $data05 != @0.713618282@ then + return -1 +endi +if $data06 != @-0.746290424@ then + return -1 +endi +if $data10 != @49@ then + return -1 +endi +if $data11 != @0.670229176@ then + return -1 +endi +if $data12 != @0.992374553@ then + return -1 +endi +if $data13 != @0.929814367@ then + return -1 +endi +if $data15 != @0.713618282@ then + return -1 +endi +if $data16 != @-0.746290424@ then + return -1 +endi +if $data20 != @48@ then + return -1 +endi +if $data21 != @-0.262374854@ then + return -1 +endi +if $data22 != @0.620208114@ then + return -1 +endi +if $data23 != @1.817585733@ then + return -1 +endi +if $data25 != @1.211884234@ then + return -1 +endi +if $data26 != @5.183714989@ then + return -1 +endi +if $data30 != @48@ then + return -1 +endi +if $data31 != @-0.262374854@ then + return -1 +endi +if $data32 != @0.620208114@ then + return -1 +endi +if $data33 != @1.817585733@ then + return -1 +endi +if $data35 != @1.211884234@ then + return -1 +endi +if $data36 != @5.183714989@ then + return -1 +endi +if $data40 != @47@ then + return -1 +endi +if $data41 != @-0.953752653@ then + return -1 +endi +if $data42 != @0.659304076@ then + return -1 +endi +if $data43 != @3.457510675@ then + return -1 +endi +if $data45 != @0.882083819@ then + return -1 +endi +if $data46 != @2.630220446@ then + return -1 +endi +if $data50 != @47@ then + return -1 +endi +if $data51 != @-0.953752653@ then + return -1 +endi +if $data52 != @0.659304076@ then + return -1 +endi +if $data53 != @3.457510675@ then + return -1 +endi +if $data55 != @0.882083819@ then + return -1 +endi +if $data56 != @2.630220446@ then + return -1 +endi +if $data60 != @46@ then + return -1 +endi +if $data61 != @-0.768254661@ then + return -1 +endi +if $data62 != @0.999843325@ then + return -1 +endi +if $data63 != @1.276316926@ then + return -1 +endi +if $data65 != @-0.300459259@ then + return -1 +endi +if $data66 != @0.133920399@ then + return -1 +endi +if $data70 != @46@ then + return -1 +endi +if $data71 != @-0.768254661@ then + return -1 +endi +if $data72 != @0.999843325@ then + return -1 +endi +if $data73 != @1.276316926@ then + return -1 +endi +if $data75 != @-0.300459259@ then + return -1 +endi +if $data76 != @0.133920399@ then + return -1 +endi +if $data80 != @45@ then + return -1 +endi +if $data81 != @0.123573123@ then + return -1 +endi +if $data82 != @0.673565060@ then + return -1 +endi +if $data83 != @1.519318619@ then + return -1 +endi +if $data85 != @-1.566189594@ then + return -1 +endi +if $data86 != @5.513771854@ then + return -1 +endi +if $data90 != @45@ then + return -1 +endi +if $data91 != @0.123573123@ then + return -1 +endi +if $data92 != @0.673565060@ then + return -1 +endi +if $data93 != @1.519318619@ then + return -1 +endi +if $data95 != @-1.566189594@ then + return -1 +endi +if $data96 != @5.513771854@ then + return -1 +endi +print execute sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from ct1 order by ts limit 2); + +sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from ct1 order by ts limit 2); + +if $rows != 2 then + return -1 +endi +if $data00 != @0@ then + return -1 +endi +if $data01 != @0.778073197@ then + return -1 +endi +if $data02 != @0.614300282@ then + return -1 +endi +if $data03 != @3.203726628@ then + return -1 +endi +if $data05 != @0.022469882@ then + return -1 +endi +if $data10 != @1@ then + return -1 +endi +if $data11 != @0.141120008@ then + return -1 +endi +if $data12 != @0.666366745@ then + return -1 +endi +if $data13 != @1.558041126@ then + return -1 +endi +if $data14 != @1.832595715@ then + return -1 +endi +if $data15 != @0.172042236@ then + return -1 +endi +print execute sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from st0 ) order by ts desc + +sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from st0 ) order by ts desc + +if $rows != 100 then + return -1 +endi +if $data00 != @36@ then + return -1 +endi +if $data01 != @0.296368579@ then + return -1 +endi +if $data02 != @0.863270440@ then + return -1 +endi +if $data03 != @0.549368160@ then + return -1 +endi +if $data05 != @0.994467885@ then + return -1 +endi +if $data06 != @11.004294268@ then + return -1 +endi +if $data10 != @36@ then + return -1 +endi +if $data11 != @0.296368579@ then + return -1 +endi +if $data12 != @0.863270440@ then + return -1 +endi +if $data13 != @0.549368160@ then + return -1 +endi +if $data15 != @0.994467885@ then + return -1 +endi +if $data16 != @11.004294268@ then + return -1 +endi +if $data20 != @14@ then + return -1 +endi +if $data21 != @-0.287903317@ then + return -1 +endi +if $data22 != @0.859465627@ then + return -1 +endi +if $data23 != @0.563690525@ then + return -1 +endi +if $data25 != @0.411421636@ then + return -1 +endi +if $data26 != @10.515512404@ then + return -1 +endi +if $data30 != @14@ then + return -1 +endi +if $data31 != @-0.287903317@ then + return -1 +endi +if $data32 != @0.859465627@ then + return -1 +endi +if $data33 != @0.563690525@ then + return -1 +endi +if $data35 != @0.411421636@ then + return -1 +endi +if $data36 != @10.515512404@ then + return -1 +endi +if $data40 != @39@ then + return -1 +endi +if $data41 != @-0.158622669@ then + return -1 +endi +if $data42 != @0.799977785@ then + return -1 +endi +if $data43 != @0.843592014@ then + return -1 +endi +if $data45 != @0.331999454@ then + return -1 +endi +if $data46 != @7.128532863@ then + return -1 +endi +if $data50 != @39@ then + return -1 +endi +if $data51 != @-0.158622669@ then + return -1 +endi +if $data52 != @0.799977785@ then + return -1 +endi +if $data53 != @0.843592014@ then + return -1 +endi +if $data55 != @0.331999454@ then + return -1 +endi +if $data56 != @7.128532863@ then + return -1 +endi +if $data60 != @17@ then + return -1 +endi +if $data61 != @0.149877210@ then + return -1 +endi +if $data62 != @0.795909569@ then + return -1 +endi +if $data63 != @0.864944321@ then + return -1 +endi +if $data65 != @-0.130372900@ then + return -1 +endi +if $data66 != @7.022998332@ then + return -1 +endi +if $data70 != @17@ then + return -1 +endi +if $data71 != @0.149877210@ then + return -1 +endi +if $data72 != @0.795909569@ then + return -1 +endi +if $data73 != @0.864944321@ then + return -1 +endi +if $data75 != @-0.130372900@ then + return -1 +endi +if $data76 != @7.022998332@ then + return -1 +endi +if $data80 != @42@ then + return -1 +endi +if $data81 != @0.017701925@ then + return -1 +endi +if $data82 != @0.735011178@ then + return -1 +endi +if $data83 != @1.191299764@ then + return -1 +endi +if $data85 != @0.036467324@ then + return -1 +endi +if $data86 != @6.024578313@ then + return -1 +endi +if $data90 != @42@ then + return -1 +endi +if $data91 != @0.017701925@ then + return -1 +endi +if $data92 != @0.735011178@ then + return -1 +endi +if $data93 != @1.191299764@ then + return -1 +endi +if $data95 != @0.036467324@ then + return -1 +endi +if $data96 != @6.024578313@ then + return -1 +endi +print execute sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from st0 ) + +sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from st0 ) + +if $rows != 100 then + return -1 +endi +if $data00 != @0@ then + return -1 +endi +if $data01 != @0.778073197@ then + return -1 +endi +if $data02 != @0.614300282@ then + return -1 +endi +if $data03 != @3.203726628@ then + return -1 +endi +if $data05 != @0.022469882@ then + return -1 +endi +if $data10 != @1@ then + return -1 +endi +if $data11 != @0.141120008@ then + return -1 +endi +if $data12 != @0.666366745@ then + return -1 +endi +if $data13 != @1.558041126@ then + return -1 +endi +if $data14 != @1.832595715@ then + return -1 +endi +if $data15 != @0.172042236@ then + return -1 +endi +if $data20 != @2@ then + return -1 +endi +if $data21 != @-0.756802495@ then + return -1 +endi +if $data22 != @1.000000000@ then + return -1 +endi +if $data23 != @1.234030298@ then + return -1 +endi +if $data25 != @0.755422294@ then + return -1 +endi +if $data26 != @0.058157641@ then + return -1 +endi +if $data30 != @3@ then + return -1 +endi +if $data31 != @-0.958924275@ then + return -1 +endi +if $data32 != @0.666366745@ then + return -1 +endi +if $data33 != @3.428875323@ then + return -1 +endi +if $data35 != @1.008737178@ then + return -1 +endi +if $data36 != @2.578037959@ then + return -1 +endi +if $data40 != @4@ then + return -1 +endi +if $data41 != @-0.279415498@ then + return -1 +endi +if $data42 != @0.614300282@ then + return -1 +endi +if $data43 != @1.853464439@ then + return -1 +endi +if $data45 != @0.382340276@ then + return -1 +endi +if $data46 != @5.147179529@ then + return -1 +endi +if $data50 != @5@ then + return -1 +endi +if $data51 != @0.656986599@ then + return -1 +endi +if $data52 != @0.990059086@ then + return -1 +endi +if $data53 != @0.886449574@ then + return -1 +endi +if $data55 != @-0.876294736@ then + return -1 +endi +if $data56 != @-0.924536117@ then + return -1 +endi +if $data60 != @6@ then + return -1 +endi +if $data61 != @0.989358247@ then + return -1 +endi +if $data62 != @0.727035131@ then + return -1 +endi +if $data63 != @3.124320480@ then + return -1 +endi +if $data65 != @-1.869688257@ then + return -1 +endi +if $data66 != @2.172420891@ then + return -1 +endi +if $data70 != @7@ then + return -1 +endi +if $data71 != @0.412118485@ then + return -1 +endi +if $data72 != @0.574400879@ then + return -1 +endi +if $data73 != @2.137595835@ then + return -1 +endi +if $data75 != @-1.811908862@ then + return -1 +endi +if $data76 != @4.862055338@ then + return -1 +endi +if $data80 != @8@ then + return -1 +endi +if $data81 != @-0.544021111@ then + return -1 +endi +if $data82 != @0.961216805@ then + return -1 +endi +if $data83 != @0.578734473@ then + return -1 +endi +if $data85 != @-0.719965518@ then + return -1 +endi +if $data86 != @-4.087614772@ then + return -1 +endi +if $data90 != @9@ then + return -1 +endi +if $data91 != @-0.999990207@ then + return -1 +endi +if $data92 != @0.791836209@ then + return -1 +endi +if $data93 != @2.776612512@ then + return -1 +endi +if $data95 != @0.592988627@ then + return -1 +endi +if $data96 != @1.796697094@ then + return -1 +endi +print execute sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from ct1 ) order by ts limit 2; + +sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from ct1 ) order by ts limit 2; + +if $rows != 2 then + return -1 +endi +if $data00 != @0@ then + return -1 +endi +if $data01 != @0.778073197@ then + return -1 +endi +if $data02 != @0.614300282@ then + return -1 +endi +if $data03 != @3.203726628@ then + return -1 +endi +if $data05 != @0.022469882@ then + return -1 +endi +if $data10 != @1@ then + return -1 +endi +if $data11 != @0.141120008@ then + return -1 +endi +if $data12 != @0.666366745@ then + return -1 +endi +if $data13 != @1.558041126@ then + return -1 +endi +if $data14 != @1.832595715@ then + return -1 +endi +if $data15 != @0.172042236@ then + return -1 +endi +print execute sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from ct1 ) limit 2; + +sql select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6 from (select * from ct1 ) limit 2; + +if $rows != 2 then + return -1 +endi +if $data00 != @0@ then + return -1 +endi +if $data01 != @0.778073197@ then + return -1 +endi +if $data02 != @0.614300282@ then + return -1 +endi +if $data03 != @3.203726628@ then + return -1 +endi +if $data05 != @0.022469882@ then + return -1 +endi +if $data10 != @1@ then + return -1 +endi +if $data11 != @0.141120008@ then + return -1 +endi +if $data12 != @0.666366745@ then + return -1 +endi +if $data13 != @1.558041126@ then + return -1 +endi +if $data14 != @1.832595715@ then + return -1 +endi +if $data15 != @0.172042236@ then + return -1 +endi +print execute sql select * from (select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6, ts from st0 order by ts desc) + +sql select * from (select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6, ts from st0 order by ts desc) + +if $rows != 100 then + return -1 +endi +if $data00 != @49@ then + return -1 +endi +if $data01 != @0.670229176@ then + return -1 +endi +if $data02 != @0.992374553@ then + return -1 +endi +if $data03 != @0.929814367@ then + return -1 +endi +if $data05 != @0.713618282@ then + return -1 +endi +if $data06 != @-0.746290424@ then + return -1 +endi +if $data07 != @20-10-01 00:49:00.000@ then + return -1 +endi +if $data10 != @49@ then + return -1 +endi +if $data11 != @0.670229176@ then + return -1 +endi +if $data12 != @0.992374553@ then + return -1 +endi +if $data13 != @0.929814367@ then + return -1 +endi +if $data15 != @0.713618282@ then + return -1 +endi +if $data16 != @-0.746290424@ then + return -1 +endi +if $data17 != @20-10-01 00:49:00.000@ then + return -1 +endi +if $data20 != @48@ then + return -1 +endi +if $data21 != @-0.262374854@ then + return -1 +endi +if $data22 != @0.620208114@ then + return -1 +endi +if $data23 != @1.817585733@ then + return -1 +endi +if $data25 != @1.211884234@ then + return -1 +endi +if $data26 != @5.183714989@ then + return -1 +endi +if $data27 != @20-10-01 00:48:00.000@ then + return -1 +endi +if $data30 != @48@ then + return -1 +endi +if $data31 != @-0.262374854@ then + return -1 +endi +if $data32 != @0.620208114@ then + return -1 +endi +if $data33 != @1.817585733@ then + return -1 +endi +if $data35 != @1.211884234@ then + return -1 +endi +if $data36 != @5.183714989@ then + return -1 +endi +if $data37 != @20-10-01 00:48:00.000@ then + return -1 +endi +if $data40 != @47@ then + return -1 +endi +if $data41 != @-0.953752653@ then + return -1 +endi +if $data42 != @0.659304076@ then + return -1 +endi +if $data43 != @3.457510675@ then + return -1 +endi +if $data45 != @0.882083819@ then + return -1 +endi +if $data46 != @2.630220446@ then + return -1 +endi +if $data47 != @20-10-01 00:47:00.000@ then + return -1 +endi +if $data50 != @47@ then + return -1 +endi +if $data51 != @-0.953752653@ then + return -1 +endi +if $data52 != @0.659304076@ then + return -1 +endi +if $data53 != @3.457510675@ then + return -1 +endi +if $data55 != @0.882083819@ then + return -1 +endi +if $data56 != @2.630220446@ then + return -1 +endi +if $data57 != @20-10-01 00:47:00.000@ then + return -1 +endi +if $data60 != @46@ then + return -1 +endi +if $data61 != @-0.768254661@ then + return -1 +endi +if $data62 != @0.999843325@ then + return -1 +endi +if $data63 != @1.276316926@ then + return -1 +endi +if $data65 != @-0.300459259@ then + return -1 +endi +if $data66 != @0.133920399@ then + return -1 +endi +if $data67 != @20-10-01 00:46:00.000@ then + return -1 +endi +if $data70 != @46@ then + return -1 +endi +if $data71 != @-0.768254661@ then + return -1 +endi +if $data72 != @0.999843325@ then + return -1 +endi +if $data73 != @1.276316926@ then + return -1 +endi +if $data75 != @-0.300459259@ then + return -1 +endi +if $data76 != @0.133920399@ then + return -1 +endi +if $data77 != @20-10-01 00:46:00.000@ then + return -1 +endi +if $data80 != @45@ then + return -1 +endi +if $data81 != @0.123573123@ then + return -1 +endi +if $data82 != @0.673565060@ then + return -1 +endi +if $data83 != @1.519318619@ then + return -1 +endi +if $data85 != @-1.566189594@ then + return -1 +endi +if $data86 != @5.513771854@ then + return -1 +endi +if $data87 != @20-10-01 00:45:00.000@ then + return -1 +endi +if $data90 != @45@ then + return -1 +endi +if $data91 != @0.123573123@ then + return -1 +endi +if $data92 != @0.673565060@ then + return -1 +endi +if $data93 != @1.519318619@ then + return -1 +endi +if $data95 != @-1.566189594@ then + return -1 +endi +if $data96 != @5.513771854@ then + return -1 +endi +if $data97 != @20-10-01 00:45:00.000@ then + return -1 +endi +print execute sql select * from (select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6, ts from ct1 order by ts limit 2); + +sql select * from (select c1, sin(c2+2), cos(sin(c1-2)), tan(cos(c2*2))+2, asin(acos(c2%3))+acos(c3/2)+atan(c5*c2) as v4, sin(c4+4.5)+cos(c3/2), tan(c1)+log(c3, c4)+sin(c6+c3)+2 as v6, ts from ct1 order by ts limit 2); + +if $rows != 2 then + return -1 +endi +if $data00 != @0@ then + return -1 +endi +if $data01 != @0.778073197@ then + return -1 +endi +if $data02 != @0.614300282@ then + return -1 +endi +if $data03 != @3.203726628@ then + return -1 +endi +if $data05 != @0.022469882@ then + return -1 +endi +if $data07 != @20-10-01 00:00:00.000@ then + return -1 +endi +if $data10 != @1@ then + return -1 +endi +if $data11 != @0.141120008@ then + return -1 +endi +if $data12 != @0.666366745@ then + return -1 +endi +if $data13 != @1.558041126@ then + return -1 +endi +if $data14 != @1.832595715@ then + return -1 +endi +if $data15 != @0.172042236@ then + return -1 +endi +if $data17 != @20-10-01 00:01:00.000@ then + return -1 +endi +print ===============> step 3 sql_error stable, group by, window +sql_error select sin(c2) from $stb group by tbname; + +sql_error select sin(c2) from $stb group by tgcol; + +sql_error select sin(c2) from $stb group by c3; + +sql_error select sin(c2) from $stb interval(1m); + +sql_error select sin(c2) from $stb state_window(c7); + +sql_error select sin(c2) from $tb state_window(c7); + +sql_error select sin(c2) from $stb session(ts, 30s); + +sql_error select sin(c2) from $tb session(ts, 30s); + +sql_error select sin(c2) from $stb slimit 2; + +sql_error select sin(c2) from $stb interval(1m) slimit 2; + +print =============== clear +#sql drop database $db +#sql show databases +#if $rows != 0 then +# return -1 +#endi + +#system sh/exec.sh -n dnode1 -s stop -x SIGINT + diff --git a/tests/script/general/compute/testSuite.sim b/tests/script/general/compute/testSuite.sim index 39eef4304091bffb6a78c3a9ac452007e2ce2892..30a364d77bb3c409f710128463730613280e97e8 100644 --- a/tests/script/general/compute/testSuite.sim +++ b/tests/script/general/compute/testSuite.sim @@ -21,4 +21,6 @@ run general/compute/sum.sim run general/compute/top.sim run general/compute/block_dist.sim run general/compute/scalar_pow.sim +run general/compute/scalar_triangle.sim +run general/compute/scalar_str_concat_len.sim run general/compute/table_group.sim diff --git a/tests/script/general/parser/scalar_expression.sim b/tests/script/general/parser/scalar_expression.sim new file mode 100644 index 0000000000000000000000000000000000000000..cc266d4489bd4cb861e34808ac700006c6bea7eb --- /dev/null +++ b/tests/script/general/parser/scalar_expression.sim @@ -0,0 +1,242 @@ + +system sh/stop_dnodes.sh + +system sh/deploy.sh -n dnode1 -i 1 +system sh/cfg.sh -n dnode1 -c walLevel -v 1 +system sh/exec.sh -n dnode1 -s start +sleep 500 +sql connect + +$dbPrefix = db +$tbPrefix = ct +$mtPrefix = st +$tbNum = 2 +$rowNum = 50 + +print =============== step1 create stable/table +$i = 0 +$db = $dbPrefix . $i +$mt = $mtPrefix . $i + +sql drop database $db -x step1 +step1: +sql create database $db +sql use $db +sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 nchar(5), c9 binary(10)) TAGS (tgcol int) +$i = 0 +while $i < $tbNum + $tb = $tbPrefix . $i + sql create table $tb using $mt tags( $i ) + + $x = 0 + $y = 0.25 + + while $x < $rowNum + $cc = $x * 60000 + $ms = 1601481600000 + $cc + sql insert into $tb values ($ms , $x , $y , $x , $x , $x , $y , $x , $x , $x ) + $x = $x + 1 + $y = $y + 1 + endw + + $i = $i + 1 +endw + +print ================= step2 +$stb = $mtPrefix . 0 +$tb = $tbPrefix . 0 +print execute sql select floor(3.0)+ceil(4.0) from $tb +sql select floor(3.0)+ceil(4.0) from $tb +if $rows != 50 then + return -1 +endi +if $data00 != 7.000000000 then + return -1 +endi +if $data10 != 7.000000000 then + return -1 +endi +if $data20 != 7.000000000 then + return -1 +endi +if $data30 != 7.000000000 then + return -1 +endi +if $data40 != 7.000000000 then + return -1 +endi +if $data50 != 7.000000000 then + return -1 +endi +if $data60 != 7.000000000 then + return -1 +endi +if $data70 != 7.000000000 then + return -1 +endi +if $data80 != 7.000000000 then + return -1 +endi +if $data90 != 7.000000000 then + return -1 +endi + +print execute sql select sum(c1)+3.0+4.0 from $stb +sql select sum(c1)+3.0+4.0 from $stb +if $rows != 1 then + return -1 +endi +if $data00 != 2457.000000000 then + return -1 +endi +print execute sql select sin(log(avg(c1),sum(c2))+3)%4 from $stb +sql select sin(log(avg(c1),sum(c2))+3)%4 from $stb +if $rows != 1 then + return -1 +endi +if $data00 != -0.265074286 then + return -1 +endi + +print execute sql select select log(pow(length(concat('3','4')),2),c2) from $stb +sql select log(pow(length(concat('3','4')),2),c2) from $stb +print [ $data00 , $data10 , $data20 , $data30 , $data40 , $data50 , $data60 , $data70 , $data80 , $data90 ] +if $data00 != -1.000000000 then + return -1 +endi +if $data10 != @inf@ then + return -1 +endi +if $data20 != 2.000000000 then + return -1 +endi +if $data30 != 1.261859507 then + return -1 +endi +if $data40 != 1.000000000 then + return -1 +endi +if $data50 != 0.861353116 then + return -1 +endi +if $data60 != 0.773705614 then + return -1 +endi +if $data70 != 0.712414374 then + return -1 +endi +if $data80 != 0.666666667 then + return -1 +endi +if $data90 != 0.630929754 then + return -1 +endi +print execute sql select round(log(pow(length(concat('3','4')),2),c2)+floor(c3))+2 from $stb +sql select round(log(pow(length(concat('3','4')),2),c2)+floor(c3))+2 from $stb +print [ $data00 , $data10 , $data20 , $data30 , $data40 , $data50 , $data60 , $data70 , $data80 , $data90 ] +if $data00 != 1.000000000 then + return -1 +endi +if $data10 != @inf@ then + return -1 +endi +if $data20 != 4.000000000 then + return -1 +endi +if $data30 != 3.000000000 then + return -1 +endi +if $data40 != 3.000000000 then + return -1 +endi +if $data50 != 3.000000000 then + return -1 +endi +if $data60 != 3.000000000 then + return -1 +endi +if $data70 != 3.000000000 then + return -1 +endi +if $data80 != 3.000000000 then + return -1 +endi +if $data90 != 3.000000000 then + return -1 +endi +$tb0 = $tbPrefix . 0 +$tb1 = $tbPrefix . 1 +print execute sql select sin(pow(c1,log(c2,2))+pow(c2,2)) as val from $tb0 union all select pow(c4,2)+tan(sin(c5)/cos(c6)) as val from $tb1 +sql select sin(pow(c1,log(c2,2))+pow(c2,2)) as val from $tb0 union all select pow(c4,2)+tan(sin(c5)/cos(c6)) as val from $tb1 +print [ $data00 , $data10 , $data20 , $data30 , $data40 , $data50 , $data60 , $data70 , $data80 , $data90 ] +if $data00 != @-nan@ then + return -1 +endi +if $data10 != 0.909297427 then + return -1 +endi +if $data20 != -0.279415498 then + return -1 +endi +if $data30 != 0.843325058 then + return -1 +endi +if $data40 != 0.551426681 then + return -1 +endi +if $data50 != -0.840606612 then + return -1 +endi +if $data60 != 0.436161076 then + return -1 +endi +if $data70 != 0.897498185 then + return -1 +endi +if $data80 != -0.885952778 then + return -1 +endi +if $data90 != 0.429470715 then + return -1 +endi +print execute sql select asin(c1) from $stb limit 1 +sql select asin(c1) from $stb limit 1 +if $data00 != 0.000000000 then + return -1 +endi +print execute sql select pow(c1,2) from $stb limit 1 offset 2; +sql select pow(c1,2) from $stb limit 1 offset 2; +if $data00 != 4.000000000 then + return -1 +endi +print exeucte sql select cos(c1) from db0.ct0, db0.ct1 where ct0.ts==ct1.ts; +sql select cos(c1) from db0.ct0, db0.ct1 where ct0.ts==ct1.ts +if $rows != 50 then + return -1 +endi +if $data10 != 0.540302306 then + return -1 +endi + +print ============== invalid expressions +sql_error select agg(c1)+c2 from $stb +sql_error select agg(c1+2) from $stb +sql_error select agg(ceil(c1))+c2 from $stb +sql_error select agg(ceil(c1)) from $stb +sql_error select asin(c1) from $stb group by tbname +sql_error select asin(c2) from $stb group by tgcol +sql_error select asin(c1) from $stb session_window(ts, 1s) +sql_error select cos(c1) from $stb state_window(f1) +sql_error select pow(c2,2) from $stb interval(1s) sliding(500a) +sql_error select pow(c2,2) from $stb state_window(f1) +sql_error select tan(f1) from $stb from d.st slimit 1 +sql_error select f1+2, tbname from $stb group by tbname +print =============== clear +sql drop database $db +sql show databases +if $rows != 0 then + return -1 +endi + +system sh/exec.sh -n dnode1 -s stop -x SIGINT + diff --git a/tests/script/regressionSuite.sim b/tests/script/regressionSuite.sim index 28d92e8e809498d96a232b34f2a72485a4fdc128..457a47c57e7dccb24271ba2588233f149b337e15 100644 --- a/tests/script/regressionSuite.sim +++ b/tests/script/regressionSuite.sim @@ -39,6 +39,8 @@ run general/compute/sum.sim run general/compute/top.sim run general/compute/block_dist.sim run general/compute/scalar_pow.sim +run general/compute/scalar_triangle.sim +run general/compute/scalar_str_concat_len.sim run general/compute/table_group.sim run general/db/alter_option.sim run general/db/alter_tables_d2.sim @@ -142,6 +144,7 @@ run general/parser/tags_dynamically_specifiy.sim run general/parser/set_tag_vals.sim run general/parser/repeatAlter.sim run general/parser/precision_ns.sim +run general/parser/scalar_expression.sim ##unsupport run general/parser/slimit_alter_tags.sim run general/stable/disk.sim run general/stable/dnode3.sim