fix(query): init filter in group operator.
This commit is contained in:
parent
2c4c9e69de
commit
341112923b
|
@ -621,10 +621,8 @@ typedef struct SIndefOperatorInfo {
|
|||
SAggSupporter aggSup;
|
||||
SArray* pPseudoColInfo;
|
||||
SExprSupp scalarSup;
|
||||
SNode* pCondition;
|
||||
uint64_t groupId;
|
||||
|
||||
SSDataBlock* pNextGroupRes;
|
||||
SSDataBlock* pNextGroupRes;
|
||||
} SIndefOperatorInfo;
|
||||
|
||||
typedef struct SFillOperatorInfo {
|
||||
|
@ -649,7 +647,6 @@ typedef struct SGroupbyOperatorInfo {
|
|||
SAggSupporter aggSup;
|
||||
SArray* pGroupCols; // group by columns, SArray<SColumn>
|
||||
SArray* pGroupColVals; // current group column values, SArray<SGroupKeys>
|
||||
SNode* pCondition;
|
||||
bool isInit; // denote if current val is initialized or not
|
||||
char* keyBuf; // group by keys for hash
|
||||
int32_t groupKeyLen; // total group by column width
|
||||
|
|
|
@ -13,6 +13,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include "filter.h"
|
||||
#include "function.h"
|
||||
#include "os.h"
|
||||
#include "tname.h"
|
||||
|
@ -414,8 +415,6 @@ SOperatorInfo* createGroupOperatorInfo(SOperatorInfo* downstream, SAggPhysiNode*
|
|||
}
|
||||
|
||||
pInfo->pGroupCols = extractColumnInfo(pAggNode->pGroupKeys);
|
||||
pInfo->pCondition = pAggNode->node.pConditions;
|
||||
|
||||
int32_t code = initExprSupp(&pInfo->scalarSup, pScalarExprInfo, numOfScalarExpr);
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
goto _error;
|
||||
|
@ -434,6 +433,11 @@ SOperatorInfo* createGroupOperatorInfo(SOperatorInfo* downstream, SAggPhysiNode*
|
|||
goto _error;
|
||||
}
|
||||
|
||||
code = filterInitFromNode((SNode*)pAggNode->node.pConditions, &pOperator->exprSupp.pFilterInfo, 0);
|
||||
if (code != TSDB_CODE_SUCCESS) {
|
||||
goto _error;
|
||||
}
|
||||
|
||||
initResultRowInfo(&pInfo->binfo.resultRowInfo);
|
||||
|
||||
pOperator->name = "GroupbyAggOperator";
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <libs/scalar/filter.h>
|
||||
#include "filter.h"
|
||||
#include "executorimpl.h"
|
||||
#include "function.h"
|
||||
#include "os.h"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <libs/scalar/filter.h>
|
||||
#include "filter.h"
|
||||
#include "executorimpl.h"
|
||||
#include "functionMgt.h"
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <libs/scalar/filter.h>
|
||||
#include "filter.h"
|
||||
#include "executorimpl.h"
|
||||
#include "tdatablock.h"
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#include <libs/scalar/filter.h>
|
||||
#include "filter.h"
|
||||
#include "os.h"
|
||||
#include "query.h"
|
||||
#include "taosdef.h"
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
#include <libs/scalar/filter.h>
|
||||
#include "filter.h"
|
||||
#include "executorimpl.h"
|
||||
#include "function.h"
|
||||
#include "functionMgt.h"
|
||||
|
|
Loading…
Reference in New Issue