提交 68f7d013 编写于 作者: S shenglian zhou

TD-14565:log function with default param base e

上级 2658f154
......@@ -1182,8 +1182,7 @@ int32_t exprValidateCastNode(char* msgbuf, tExprNode *pExpr) {
int32_t exprValidateMathNode(tExprNode *pExpr) {
switch (pExpr->_func.functionId) {
case TSDB_FUNC_SCALAR_POW:
case TSDB_FUNC_SCALAR_LOG: {
case TSDB_FUNC_SCALAR_POW: {
if (pExpr->_func.numChildren != 2) {
return TSDB_CODE_TSC_INVALID_OPERATION;
}
......@@ -1198,6 +1197,27 @@ int32_t exprValidateMathNode(tExprNode *pExpr) {
return TSDB_CODE_SUCCESS;
}
case TSDB_FUNC_SCALAR_LOG: {
if (pExpr->_func.numChildren != 1 && pExpr->_func.numChildren != 2) {
return TSDB_CODE_TSC_INVALID_OPERATION;
}
tExprNode *child1 = pExpr->_func.pChildren[0];
if (!IS_NUMERIC_TYPE(child1->resultType)) {
return TSDB_CODE_TSC_INVALID_OPERATION;
}
if (pExpr->_func.numChildren == 2) {
tExprNode *child2 = pExpr->_func.pChildren[1];
if (!IS_NUMERIC_TYPE(child2->resultType)) {
return TSDB_CODE_TSC_INVALID_OPERATION;
}
}
pExpr->resultType = TSDB_DATA_TYPE_DOUBLE;
pExpr->resultBytes = tDataTypes[TSDB_DATA_TYPE_DOUBLE].bytes;
return TSDB_CODE_SUCCESS;
}
case TSDB_FUNC_SCALAR_ABS: {
if (pExpr->_func.numChildren != 1) {
return TSDB_CODE_TSC_INVALID_OPERATION;
......@@ -2041,13 +2061,20 @@ void vectorMathFunc(int16_t functionId, tExprOperandInfo *pInputs, int32_t numIn
if (!hasNullInputs) {
switch (functionId) {
case TSDB_FUNC_SCALAR_LOG: {
assert(numInputs == 2);
double base = 0;
GET_TYPED_DATA(base, double, pInputs[1].type, inputData[1]);
assert(numInputs == 1 || numInputs == 2);
double base = M_E;
if (numInputs == 2) {
GET_TYPED_DATA(base, double, pInputs[1].type, inputData[1]);
}
double v1 = 0;
GET_TYPED_DATA(v1, double, pInputs[0].type, inputData[0]);
double result = log(v1) / log(base);
SET_TYPED_DATA(outputData, pOutput->type, result);
if (numInputs == 2) {
double result = log(v1) / log(base);
SET_TYPED_DATA(outputData, pOutput->type, result);
} else {
double result = log(v1);
SET_TYPED_DATA(outputData, pOutput->type, result);
}
break;
}
......
......@@ -8,7 +8,8 @@ from math import inf
class TDTestCase:
def caseDescription(self):
'''
case1<shenglian zhou>: [TD-14123]: fix failed test on arm64 by converting from sim tst to python test to overcome NaN value and its string representation
case1<shenglian zhou>: [TD-14123]: fix failed test on arm64 by converting from sim tst to python test to overcome NaN value and its string representation
case2<shenglian zhou>: [TD-14565]: log function default base param e
'''
return
......@@ -30,28 +31,86 @@ class TDTestCase:
tdSql.execute('create table st0 (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);')
tdSql.execute('create table ct0 using st0 tags( 0 );')
tdSql.execute('insert into ct0 values (1601481600000 , 0 , 0.25 , 0 , 0 , 0 , 0.25 , 0 , 0 , 0 );')
for i in range(1, 50):
tdSql.execute('insert into ct0 values ({}, {}, {}, {}, {}, {}, {}, {}, {}, {});'.format(1601481600000 + i * 60000,
i , i , i , i , i , i , i , i , i ))
tdSql.execute('create table ct1 using st0 tags( 1 );')
tdSql.execute('insert into ct1 values (1601481600000 , 0 , 0.25 , 0 , 0 , 0 , 0.25 , 0 , 0 , 0 );')
for i in range(1, 50):
tdSql.execute('insert into ct1 values ({}, {}, {}, {}, {}, {}, {}, {}, {}, {});'.format(1601481600000 + i * 60000,
i , i , i , i , i , i , i , i , i ))
tdSql.execute('insert into ct1 values (1601484420000 , 47 , 47 , 47 , 47 , 47 , 47 , 47 , 47 , 47 );')
tdSql.execute('insert into ct1 values (1601484480000 , 48 , 48 , 48 , 48 , 48 , 48 , 48 , 48 , 48 );')
tdSql.execute('insert into ct1 values (1601484540000 , 49 , 49 , 49 , 49 , 49 , 49 , 49 , 49 , 49 );')
tdSql.query('select floor(3.0)+ceil(4.0) from ct0;')
tdSql.checkRows(50)
for row in range(0, 50):
tdSql.checkData(row, 0, 7.0)
tdSql.checkData(0, 0, 7.0)
tdSql.checkData(1, 0, 7.0)
tdSql.checkData(2, 0, 7.0)
tdSql.checkData(3, 0, 7.0)
tdSql.checkData(4, 0, 7.0)
tdSql.checkData(5, 0, 7.0)
tdSql.checkData(6, 0, 7.0)
tdSql.checkData(7, 0, 7.0)
tdSql.checkData(8, 0, 7.0)
tdSql.checkData(9, 0, 7.0)
tdSql.checkData(10, 0, 7.0)
tdSql.checkData(11, 0, 7.0)
tdSql.checkData(12, 0, 7.0)
tdSql.checkData(13, 0, 7.0)
tdSql.checkData(14, 0, 7.0)
tdSql.checkData(15, 0, 7.0)
tdSql.checkData(16, 0, 7.0)
tdSql.checkData(17, 0, 7.0)
tdSql.checkData(18, 0, 7.0)
tdSql.checkData(19, 0, 7.0)
tdSql.checkData(20, 0, 7.0)
tdSql.checkData(21, 0, 7.0)
tdSql.checkData(22, 0, 7.0)
tdSql.checkData(23, 0, 7.0)
tdSql.checkData(24, 0, 7.0)
tdSql.checkData(25, 0, 7.0)
tdSql.checkData(26, 0, 7.0)
tdSql.checkData(27, 0, 7.0)
tdSql.checkData(28, 0, 7.0)
tdSql.checkData(29, 0, 7.0)
tdSql.checkData(30, 0, 7.0)
tdSql.checkData(31, 0, 7.0)
tdSql.checkData(32, 0, 7.0)
tdSql.checkData(33, 0, 7.0)
tdSql.checkData(34, 0, 7.0)
tdSql.checkData(35, 0, 7.0)
tdSql.checkData(36, 0, 7.0)
tdSql.checkData(37, 0, 7.0)
tdSql.checkData(38, 0, 7.0)
tdSql.checkData(39, 0, 7.0)
tdSql.checkData(40, 0, 7.0)
tdSql.checkData(41, 0, 7.0)
tdSql.checkData(42, 0, 7.0)
tdSql.checkData(43, 0, 7.0)
tdSql.checkData(44, 0, 7.0)
tdSql.checkData(45, 0, 7.0)
tdSql.checkData(46, 0, 7.0)
tdSql.checkData(47, 0, 7.0)
tdSql.checkData(48, 0, 7.0)
tdSql.checkData(49, 0, 7.0)
tdSql.query('select sum(c1)+3.0+4.0 from st0;')
tdSql.checkRows(1)
tdSql.checkData(0, 0, 2457.0)
tdSql.query('select sin(log(avg(c1))+3)%4 from st0;')
tdSql.checkRows(1)
tdSql.checkData(0, 0, -0.08441162350373656)
tdSql.query('select sin(log(avg(c1),sum(c2))+3)%4 from st0;')
tdSql.checkRows(1)
tdSql.checkData(0, 0, -0.26507428560248714)
......@@ -159,6 +218,109 @@ class TDTestCase:
tdSql.checkData(98, 0, 0.3581044635020827)
tdSql.checkData(99, 0, 0.3562071871080222)
tdSql.query("select log(pow(length(concat('3','4')),2)) from st0;")
tdSql.checkRows(100)
tdSql.checkData(0, 0, 1.3862943611198906)
tdSql.checkData(1, 0, 1.3862943611198906)
tdSql.checkData(2, 0, 1.3862943611198906)
tdSql.checkData(3, 0, 1.3862943611198906)
tdSql.checkData(4, 0, 1.3862943611198906)
tdSql.checkData(5, 0, 1.3862943611198906)
tdSql.checkData(6, 0, 1.3862943611198906)
tdSql.checkData(7, 0, 1.3862943611198906)
tdSql.checkData(8, 0, 1.3862943611198906)
tdSql.checkData(9, 0, 1.3862943611198906)
tdSql.checkData(10, 0, 1.3862943611198906)
tdSql.checkData(11, 0, 1.3862943611198906)
tdSql.checkData(12, 0, 1.3862943611198906)
tdSql.checkData(13, 0, 1.3862943611198906)
tdSql.checkData(14, 0, 1.3862943611198906)
tdSql.checkData(15, 0, 1.3862943611198906)
tdSql.checkData(16, 0, 1.3862943611198906)
tdSql.checkData(17, 0, 1.3862943611198906)
tdSql.checkData(18, 0, 1.3862943611198906)
tdSql.checkData(19, 0, 1.3862943611198906)
tdSql.checkData(20, 0, 1.3862943611198906)
tdSql.checkData(21, 0, 1.3862943611198906)
tdSql.checkData(22, 0, 1.3862943611198906)
tdSql.checkData(23, 0, 1.3862943611198906)
tdSql.checkData(24, 0, 1.3862943611198906)
tdSql.checkData(25, 0, 1.3862943611198906)
tdSql.checkData(26, 0, 1.3862943611198906)
tdSql.checkData(27, 0, 1.3862943611198906)
tdSql.checkData(28, 0, 1.3862943611198906)
tdSql.checkData(29, 0, 1.3862943611198906)
tdSql.checkData(30, 0, 1.3862943611198906)
tdSql.checkData(31, 0, 1.3862943611198906)
tdSql.checkData(32, 0, 1.3862943611198906)
tdSql.checkData(33, 0, 1.3862943611198906)
tdSql.checkData(34, 0, 1.3862943611198906)
tdSql.checkData(35, 0, 1.3862943611198906)
tdSql.checkData(36, 0, 1.3862943611198906)
tdSql.checkData(37, 0, 1.3862943611198906)
tdSql.checkData(38, 0, 1.3862943611198906)
tdSql.checkData(39, 0, 1.3862943611198906)
tdSql.checkData(40, 0, 1.3862943611198906)
tdSql.checkData(41, 0, 1.3862943611198906)
tdSql.checkData(42, 0, 1.3862943611198906)
tdSql.checkData(43, 0, 1.3862943611198906)
tdSql.checkData(44, 0, 1.3862943611198906)
tdSql.checkData(45, 0, 1.3862943611198906)
tdSql.checkData(46, 0, 1.3862943611198906)
tdSql.checkData(47, 0, 1.3862943611198906)
tdSql.checkData(48, 0, 1.3862943611198906)
tdSql.checkData(49, 0, 1.3862943611198906)
tdSql.checkData(50, 0, 1.3862943611198906)
tdSql.checkData(51, 0, 1.3862943611198906)
tdSql.checkData(52, 0, 1.3862943611198906)
tdSql.checkData(53, 0, 1.3862943611198906)
tdSql.checkData(54, 0, 1.3862943611198906)
tdSql.checkData(55, 0, 1.3862943611198906)
tdSql.checkData(56, 0, 1.3862943611198906)
tdSql.checkData(57, 0, 1.3862943611198906)
tdSql.checkData(58, 0, 1.3862943611198906)
tdSql.checkData(59, 0, 1.3862943611198906)
tdSql.checkData(60, 0, 1.3862943611198906)
tdSql.checkData(61, 0, 1.3862943611198906)
tdSql.checkData(62, 0, 1.3862943611198906)
tdSql.checkData(63, 0, 1.3862943611198906)
tdSql.checkData(64, 0, 1.3862943611198906)
tdSql.checkData(65, 0, 1.3862943611198906)
tdSql.checkData(66, 0, 1.3862943611198906)
tdSql.checkData(67, 0, 1.3862943611198906)
tdSql.checkData(68, 0, 1.3862943611198906)
tdSql.checkData(69, 0, 1.3862943611198906)
tdSql.checkData(70, 0, 1.3862943611198906)
tdSql.checkData(71, 0, 1.3862943611198906)
tdSql.checkData(72, 0, 1.3862943611198906)
tdSql.checkData(73, 0, 1.3862943611198906)
tdSql.checkData(74, 0, 1.3862943611198906)
tdSql.checkData(75, 0, 1.3862943611198906)
tdSql.checkData(76, 0, 1.3862943611198906)
tdSql.checkData(77, 0, 1.3862943611198906)
tdSql.checkData(78, 0, 1.3862943611198906)
tdSql.checkData(79, 0, 1.3862943611198906)
tdSql.checkData(80, 0, 1.3862943611198906)
tdSql.checkData(81, 0, 1.3862943611198906)
tdSql.checkData(82, 0, 1.3862943611198906)
tdSql.checkData(83, 0, 1.3862943611198906)
tdSql.checkData(84, 0, 1.3862943611198906)
tdSql.checkData(85, 0, 1.3862943611198906)
tdSql.checkData(86, 0, 1.3862943611198906)
tdSql.checkData(87, 0, 1.3862943611198906)
tdSql.checkData(88, 0, 1.3862943611198906)
tdSql.checkData(89, 0, 1.3862943611198906)
tdSql.checkData(90, 0, 1.3862943611198906)
tdSql.checkData(91, 0, 1.3862943611198906)
tdSql.checkData(92, 0, 1.3862943611198906)
tdSql.checkData(93, 0, 1.3862943611198906)
tdSql.checkData(94, 0, 1.3862943611198906)
tdSql.checkData(95, 0, 1.3862943611198906)
tdSql.checkData(96, 0, 1.3862943611198906)
tdSql.checkData(97, 0, 1.3862943611198906)
tdSql.checkData(98, 0, 1.3862943611198906)
tdSql.checkData(99, 0, 1.3862943611198906)
tdSql.query("select round(log(pow(length(concat('3','4')),2),c2)+floor(c3))+2 from st0;")
tdSql.checkRows(100)
tdSql.checkData(0, 0, 1.0)
......@@ -262,6 +424,109 @@ class TDTestCase:
tdSql.checkData(98, 0, 50.0)
tdSql.checkData(99, 0, 51.0)
tdSql.query("select round(log(pow(length(concat('3','4')),2))+floor(c3))+2 from st0;")
tdSql.checkRows(100)
tdSql.checkData(0, 0, 3.0)
tdSql.checkData(1, 0, 4.0)
tdSql.checkData(2, 0, 5.0)
tdSql.checkData(3, 0, 6.0)
tdSql.checkData(4, 0, 7.0)
tdSql.checkData(5, 0, 8.0)
tdSql.checkData(6, 0, 9.0)
tdSql.checkData(7, 0, 10.0)
tdSql.checkData(8, 0, 11.0)
tdSql.checkData(9, 0, 12.0)
tdSql.checkData(10, 0, 13.0)
tdSql.checkData(11, 0, 14.0)
tdSql.checkData(12, 0, 15.0)
tdSql.checkData(13, 0, 16.0)
tdSql.checkData(14, 0, 17.0)
tdSql.checkData(15, 0, 18.0)
tdSql.checkData(16, 0, 19.0)
tdSql.checkData(17, 0, 20.0)
tdSql.checkData(18, 0, 21.0)
tdSql.checkData(19, 0, 22.0)
tdSql.checkData(20, 0, 23.0)
tdSql.checkData(21, 0, 24.0)
tdSql.checkData(22, 0, 25.0)
tdSql.checkData(23, 0, 26.0)
tdSql.checkData(24, 0, 27.0)
tdSql.checkData(25, 0, 28.0)
tdSql.checkData(26, 0, 29.0)
tdSql.checkData(27, 0, 30.0)
tdSql.checkData(28, 0, 31.0)
tdSql.checkData(29, 0, 32.0)
tdSql.checkData(30, 0, 33.0)
tdSql.checkData(31, 0, 34.0)
tdSql.checkData(32, 0, 35.0)
tdSql.checkData(33, 0, 36.0)
tdSql.checkData(34, 0, 37.0)
tdSql.checkData(35, 0, 38.0)
tdSql.checkData(36, 0, 39.0)
tdSql.checkData(37, 0, 40.0)
tdSql.checkData(38, 0, 41.0)
tdSql.checkData(39, 0, 42.0)
tdSql.checkData(40, 0, 43.0)
tdSql.checkData(41, 0, 44.0)
tdSql.checkData(42, 0, 45.0)
tdSql.checkData(43, 0, 46.0)
tdSql.checkData(44, 0, 47.0)
tdSql.checkData(45, 0, 48.0)
tdSql.checkData(46, 0, 49.0)
tdSql.checkData(47, 0, 50.0)
tdSql.checkData(48, 0, 51.0)
tdSql.checkData(49, 0, 52.0)
tdSql.checkData(50, 0, 3.0)
tdSql.checkData(51, 0, 4.0)
tdSql.checkData(52, 0, 5.0)
tdSql.checkData(53, 0, 6.0)
tdSql.checkData(54, 0, 7.0)
tdSql.checkData(55, 0, 8.0)
tdSql.checkData(56, 0, 9.0)
tdSql.checkData(57, 0, 10.0)
tdSql.checkData(58, 0, 11.0)
tdSql.checkData(59, 0, 12.0)
tdSql.checkData(60, 0, 13.0)
tdSql.checkData(61, 0, 14.0)
tdSql.checkData(62, 0, 15.0)
tdSql.checkData(63, 0, 16.0)
tdSql.checkData(64, 0, 17.0)
tdSql.checkData(65, 0, 18.0)
tdSql.checkData(66, 0, 19.0)
tdSql.checkData(67, 0, 20.0)
tdSql.checkData(68, 0, 21.0)
tdSql.checkData(69, 0, 22.0)
tdSql.checkData(70, 0, 23.0)
tdSql.checkData(71, 0, 24.0)
tdSql.checkData(72, 0, 25.0)
tdSql.checkData(73, 0, 26.0)
tdSql.checkData(74, 0, 27.0)
tdSql.checkData(75, 0, 28.0)
tdSql.checkData(76, 0, 29.0)
tdSql.checkData(77, 0, 30.0)
tdSql.checkData(78, 0, 31.0)
tdSql.checkData(79, 0, 32.0)
tdSql.checkData(80, 0, 33.0)
tdSql.checkData(81, 0, 34.0)
tdSql.checkData(82, 0, 35.0)
tdSql.checkData(83, 0, 36.0)
tdSql.checkData(84, 0, 37.0)
tdSql.checkData(85, 0, 38.0)
tdSql.checkData(86, 0, 39.0)
tdSql.checkData(87, 0, 40.0)
tdSql.checkData(88, 0, 41.0)
tdSql.checkData(89, 0, 42.0)
tdSql.checkData(90, 0, 43.0)
tdSql.checkData(91, 0, 44.0)
tdSql.checkData(92, 0, 45.0)
tdSql.checkData(93, 0, 46.0)
tdSql.checkData(94, 0, 47.0)
tdSql.checkData(95, 0, 48.0)
tdSql.checkData(96, 0, 49.0)
tdSql.checkData(97, 0, 50.0)
tdSql.checkData(98, 0, 51.0)
tdSql.checkData(99, 0, 52.0)
tdSql.query('select sin(pow(c1,log(c2,2))+pow(c2,2)) as val from ct0 union all select pow(c4,2)+tan(sin(c5)/cos(c6)) as val from ct1;')
tdSql.checkRows(100)
tdSql.checkData(0, 0, None)
......@@ -365,6 +630,109 @@ class TDTestCase:
tdSql.checkData(98, 0, 2306.5731210183926)
tdSql.checkData(99, 0, 2400.9686738603973)
tdSql.query('select sin(pow(c1,log(c2))+pow(c2,2)) as val from ct0 union all select pow(c4,2)+tan(sin(c5)/cos(c6)) as val from ct1;')
tdSql.checkRows(100)
tdSql.checkData(0, 0, None)
tdSql.checkData(1, 0, 0.9092974268256817)
tdSql.checkData(2, 0, -0.618143416955856)
tdSql.checkData(3, 0, -0.2212557848433586)
tdSql.checkData(4, 0, -0.7460971214044105)
tdSql.checkData(5, 0, 0.592800037732941)
tdSql.checkData(6, 0, -0.8906573525446361)
tdSql.checkData(7, 0, -0.9099160274536024)
tdSql.checkData(8, 0, 0.9538272638464387)
tdSql.checkData(9, 0, -0.9870736916693152)
tdSql.checkData(10, 0, -0.7678397236409038)
tdSql.checkData(11, 0, 0.9987895951483741)
tdSql.checkData(12, 0, 0.6508715058131205)
tdSql.checkData(13, 0, 0.27310147774290205)
tdSql.checkData(14, 0, -0.852597740468949)
tdSql.checkData(15, 0, 0.35731340778818926)
tdSql.checkData(16, 0, -0.9981208983068915)
tdSql.checkData(17, 0, 0.23713034837959204)
tdSql.checkData(18, 0, -0.9227979044693351)
tdSql.checkData(19, 0, 0.7969587979292067)
tdSql.checkData(20, 0, -0.9894078111821204)
tdSql.checkData(21, 0, 0.5159266172394235)
tdSql.checkData(22, 0, 0.04665947694609208)
tdSql.checkData(23, 0, -0.9057268036004363)
tdSql.checkData(24, 0, 0.5081537719119912)
tdSql.checkData(25, 0, 0.13392418253128227)
tdSql.checkData(26, 0, 0.22117745004778874)
tdSql.checkData(27, 0, 0.3454954775028113)
tdSql.checkData(28, 0, 0.5242670110408245)
tdSql.checkData(29, 0, 0.8951019564578349)
tdSql.checkData(30, 0, 0.9881770927793502)
tdSql.checkData(31, 0, 0.7074846709788886)
tdSql.checkData(32, 0, 0.9954576249796087)
tdSql.checkData(33, 0, -0.7704946306359923)
tdSql.checkData(34, 0, 0.9966097580600035)
tdSql.checkData(35, 0, -0.03188573219367)
tdSql.checkData(36, 0, 0.9672274483362059)
tdSql.checkData(37, 0, -0.5524968695809724)
tdSql.checkData(38, 0, 0.4230579655135496)
tdSql.checkData(39, 0, 0.21369691105494243)
tdSql.checkData(40, 0, -0.46608214968746425)
tdSql.checkData(41, 0, -0.2069391679125316)
tdSql.checkData(42, 0, -0.978130009430021)
tdSql.checkData(43, 0, -0.7145841372258956)
tdSql.checkData(44, 0, -0.07829036190548645)
tdSql.checkData(45, 0, -0.5852465890666977)
tdSql.checkData(46, 0, -0.6043735013959997)
tdSql.checkData(47, 0, 0.4866796582369138)
tdSql.checkData(48, 0, 0.06632187104835804)
tdSql.checkData(49, 0, 0.9288185068522878)
tdSql.checkData(50, 0, 0.0)
tdSql.checkData(51, 0, 75.68593339876413)
tdSql.checkData(52, 0, 5.417928575505387)
tdSql.checkData(53, 0, 8.85648005221507)
tdSql.checkData(54, 0, 18.282204450191365)
tdSql.checkData(55, 0, 24.756425180209273)
tdSql.checkData(56, 0, 35.7004910910186)
tdSql.checkData(57, 0, 50.188813241198766)
tdSql.checkData(58, 0, 63.43204170645191)
tdSql.checkData(59, 0, 80.51408573049088)
tdSql.checkData(60, 0, 100.75762114788726)
tdSql.checkData(61, 0, 121.24877416559158)
tdSql.checkData(62, 0, 143.26187154057212)
tdSql.checkData(63, 0, 169.49921715003558)
tdSql.checkData(64, 0, 197.43268735470073)
tdSql.checkData(65, 0, 223.84781294184071)
tdSql.checkData(66, 0, 256.31002912578884)
tdSql.checkData(67, 0, 289.36766325453783)
tdSql.checkData(68, 0, 321.83943972533865)
tdSql.checkData(69, 0, 361.1527613871425)
tdSql.checkData(70, 0, 398.72830803672844)
tdSql.checkData(71, 0, 417.9185722713414)
tdSql.checkData(72, 0, 484.00885188723004)
tdSql.checkData(73, 0, 471.3913348423639)
tdSql.checkData(74, 0, 577.5805869142416)
tdSql.checkData(75, 0, 624.8656743315343)
tdSql.checkData(76, 0, 678.4187022341146)
tdSql.checkData(77, 0, 728.8671148549121)
tdSql.checkData(78, 0, 783.7108972216736)
tdSql.checkData(79, 0, 842.2274126544997)
tdSql.checkData(80, 0, 899.877243006616)
tdSql.checkData(81, 0, 960.5271464519064)
tdSql.checkData(82, 0, 1024.7777181923664)
tdSql.checkData(83, 0, 1089.0854157079946)
tdSql.checkData(84, 0, 1155.2807954785546)
tdSql.checkData(85, 0, 1225.5127742681332)
tdSql.checkData(86, 0, 1305.6263061095037)
tdSql.checkData(87, 0, 1367.8826349729482)
tdSql.checkData(88, 0, 1444.32066897418)
tdSql.checkData(89, 0, 1521.5116974949854)
tdSql.checkData(90, 0, 1597.9486330581901)
tdSql.checkData(91, 0, 1681.1620533335488)
tdSql.checkData(92, 0, 1762.8611973159218)
tdSql.checkData(93, 0, 1835.2137045408574)
tdSql.checkData(94, 0, 1936.0177065493942)
tdSql.checkData(95, 0, 2004.599358732067)
tdSql.checkData(96, 0, 2117.763602992286)
tdSql.checkData(97, 0, 2208.874824726169)
tdSql.checkData(98, 0, 2306.5731210183926)
tdSql.checkData(99, 0, 2400.9686738603973)
tdSql.query('select asin(c1) from st0 limit 1;')
tdSql.checkRows(1)
tdSql.checkData(0, 0, 0.0)
......@@ -529,9 +897,10 @@ class TDTestCase:
tdSql.checkData(98, 0, -0.3782246656581614)
tdSql.checkData(99, 0, -0.392935768393244)
tdSql.execute('drop database db0;')
tdSql.execute('drop database db0')
def stop(self):
tdSql.close()
tdLog.success("%s successfully executed" % __file__)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册