提交 7cda5c27 编写于 作者: X Xiaoyu Wang

enh: fill value supports implicit type conversion

上级 dc0d3745
...@@ -2217,8 +2217,8 @@ bool leastSQRFunctionSetup(SqlFunctionCtx* pCtx, SResultRowEntryInfo* pResultInf ...@@ -2217,8 +2217,8 @@ bool leastSQRFunctionSetup(SqlFunctionCtx* pCtx, SResultRowEntryInfo* pResultInf
SLeastSQRInfo* pInfo = GET_ROWCELL_INTERBUF(pResultInfo); SLeastSQRInfo* pInfo = GET_ROWCELL_INTERBUF(pResultInfo);
GET_TYPED_DATA(pInfo->startVal, double, pCtx->param[1].param.nType, pCtx->param[1].param.i); GET_TYPED_DATA(pInfo->startVal, double, pCtx->param[1].param.nType, &pCtx->param[1].param.i);
GET_TYPED_DATA(pInfo->stepVal, double, pCtx->param[2].param.nType, pCtx->param[2].param.i); GET_TYPED_DATA(pInfo->stepVal, double, pCtx->param[2].param.nType, &pCtx->param[2].param.i);
return true; return true;
} }
...@@ -2563,7 +2563,7 @@ int32_t percentileFunction(SqlFunctionCtx* pCtx) { ...@@ -2563,7 +2563,7 @@ int32_t percentileFunction(SqlFunctionCtx* pCtx) {
int32_t percentileFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) { int32_t percentileFinalize(SqlFunctionCtx* pCtx, SSDataBlock* pBlock) {
SVariant* pVal = &pCtx->param[1].param; SVariant* pVal = &pCtx->param[1].param;
double v = 0; double v = 0;
GET_TYPED_DATA(v, double, pVal->nType, pVal->i); GET_TYPED_DATA(v, double, pVal->nType, &pVal->i);
SResultRowEntryInfo* pResInfo = GET_RES_INFO(pCtx); SResultRowEntryInfo* pResInfo = GET_RES_INFO(pCtx);
SPercentileInfo* ppInfo = (SPercentileInfo*)GET_ROWCELL_INTERBUF(pResInfo); SPercentileInfo* ppInfo = (SPercentileInfo*)GET_ROWCELL_INTERBUF(pResInfo);
...@@ -2623,7 +2623,7 @@ bool apercentileFunctionSetup(SqlFunctionCtx* pCtx, SResultRowEntryInfo* pResult ...@@ -2623,7 +2623,7 @@ bool apercentileFunctionSetup(SqlFunctionCtx* pCtx, SResultRowEntryInfo* pResult
SVariant* pVal = &pCtx->param[1].param; SVariant* pVal = &pCtx->param[1].param;
pInfo->percent = 0; pInfo->percent = 0;
GET_TYPED_DATA(pInfo->percent, double, pVal->nType, pVal->i); GET_TYPED_DATA(pInfo->percent, double, pVal->nType, &pVal->i);
if (pCtx->numOfParams == 2) { if (pCtx->numOfParams == 2) {
pInfo->algo = APERCT_ALGO_DEFAULT; pInfo->algo = APERCT_ALGO_DEFAULT;
......
...@@ -348,7 +348,9 @@ static int32_t scanPathOptimize(SOptimizeContext* pCxt, SLogicSubplan* pLogicSub ...@@ -348,7 +348,9 @@ static int32_t scanPathOptimize(SOptimizeContext* pCxt, SLogicSubplan* pLogicSub
int32_t code = scanPathOptMatch(pCxt, pLogicSubplan->pNode, &info); int32_t code = scanPathOptMatch(pCxt, pLogicSubplan->pNode, &info);
if (TSDB_CODE_SUCCESS == code && info.pScan) { if (TSDB_CODE_SUCCESS == code && info.pScan) {
scanPathOptSetScanWin(info.pScan); scanPathOptSetScanWin(info.pScan);
scanPathOptSetScanOrder(info.scanOrder, info.pScan); if (!pCxt->pPlanCxt->streamQuery) {
scanPathOptSetScanOrder(info.scanOrder, info.pScan);
}
} }
if (TSDB_CODE_SUCCESS == code && (NULL != info.pDsoFuncs || NULL != info.pSdrFuncs)) { if (TSDB_CODE_SUCCESS == code && (NULL != info.pDsoFuncs || NULL != info.pSdrFuncs)) {
info.pScan->dataRequired = scanPathOptGetDataRequired(info.pSdrFuncs); info.pScan->dataRequired = scanPathOptGetDataRequired(info.pSdrFuncs);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册