Merge pull request #15762 from taosdata/fix/TD-18115
fix(query): fix interp function core dump
This commit is contained in:
commit
06b4177940
|
@ -2375,6 +2375,8 @@ SOperatorInfo* createTimeSliceOperatorInfo(SOperatorInfo* downstream, SPhysiNode
|
||||||
pOperator->fpSet =
|
pOperator->fpSet =
|
||||||
createOperatorFpSet(operatorDummyOpenFn, doTimeslice, NULL, NULL, destroyBasicOperatorInfo, NULL, NULL, NULL);
|
createOperatorFpSet(operatorDummyOpenFn, doTimeslice, NULL, NULL, destroyBasicOperatorInfo, NULL, NULL, NULL);
|
||||||
|
|
||||||
|
blockDataEnsureCapacity(pInfo->pRes, pOperator->resultInfo.capacity);
|
||||||
|
|
||||||
code = appendDownstream(pOperator, &downstream, 1);
|
code = appendDownstream(pOperator, &downstream, 1);
|
||||||
return pOperator;
|
return pOperator;
|
||||||
|
|
||||||
|
|
|
@ -2298,7 +2298,7 @@ const SBuiltinFuncDefinition funcMgtBuiltins[] = {
|
||||||
{
|
{
|
||||||
.name = "derivative",
|
.name = "derivative",
|
||||||
.type = FUNCTION_TYPE_DERIVATIVE,
|
.type = FUNCTION_TYPE_DERIVATIVE,
|
||||||
.classification = FUNC_MGT_INDEFINITE_ROWS_FUNC | FUNC_MGT_SELECT_FUNC | FUNC_MGT_TIMELINE_FUNC | FUNC_MGT_IMPLICIT_TS_FUNC |
|
.classification = FUNC_MGT_INDEFINITE_ROWS_FUNC | FUNC_MGT_SELECT_FUNC | FUNC_MGT_TIMELINE_FUNC | FUNC_MGT_IMPLICIT_TS_FUNC |
|
||||||
FUNC_MGT_KEEP_ORDER_FUNC | FUNC_MGT_CUMULATIVE_FUNC | FUNC_MGT_FORBID_STREAM_FUNC,
|
FUNC_MGT_KEEP_ORDER_FUNC | FUNC_MGT_CUMULATIVE_FUNC | FUNC_MGT_FORBID_STREAM_FUNC,
|
||||||
.translateFunc = translateDerivative,
|
.translateFunc = translateDerivative,
|
||||||
.getEnvFunc = getDerivativeFuncEnv,
|
.getEnvFunc = getDerivativeFuncEnv,
|
||||||
|
|
|
@ -160,12 +160,12 @@ endi
|
||||||
|
|
||||||
sql select stddev(c1) from (select c1 from nest_tb0);
|
sql select stddev(c1) from (select c1 from nest_tb0);
|
||||||
sql_error select percentile(c1, 20) from (select * from nest_tb0);
|
sql_error select percentile(c1, 20) from (select * from nest_tb0);
|
||||||
sql select interp(c1) from (select * from nest_tb0);
|
#sql select interp(c1) from (select * from nest_tb0);
|
||||||
sql_error select derivative(val, 1s, 0) from (select c1 val from nest_tb0);
|
sql_error select derivative(val, 1s, 0) from (select c1 val from nest_tb0);
|
||||||
sql_error select twa(c1) from (select c1 from nest_tb0);
|
sql_error select twa(c1) from (select c1 from nest_tb0);
|
||||||
sql_error select irate(c1) from (select c1 from nest_tb0);
|
sql_error select irate(c1) from (select c1 from nest_tb0);
|
||||||
sql_error select diff(c1), twa(c1) from (select * from nest_tb0);
|
sql_error select diff(c1), twa(c1) from (select * from nest_tb0);
|
||||||
sql_error select irate(c1), interp(c1), twa(c1) from (select * from nest_tb0);
|
#sql_error select irate(c1), interp(c1), twa(c1) from (select * from nest_tb0);
|
||||||
|
|
||||||
sql select _wstart, apercentile(c1, 50) from (select * from nest_tb0) interval(1d)
|
sql select _wstart, apercentile(c1, 50) from (select * from nest_tb0) interval(1d)
|
||||||
if $rows != 7 then
|
if $rows != 7 then
|
||||||
|
|
Loading…
Reference in New Issue