fix: add on conditions null check and rightRowLocations no longer hides the outer scope rightRowLocations
This commit is contained in:
parent
568725a245
commit
03e77288e8
|
@ -477,7 +477,7 @@ static int32_t mergeJoinGetDownStreamRowsEqualTimeStamp(SOperatorInfo* pOperator
|
|||
}
|
||||
|
||||
static int32_t mergeJoinCreateBuildTable(SJoinOperatorInfo* pInfo, SArray* rightRowLocations,SSHashObj** ppHashObj) {
|
||||
int32_t buildTableCap = MIN(taosArrayGetSize(rightRowLocations), 4096);
|
||||
int32_t buildTableCap = TMIN(taosArrayGetSize(rightRowLocations), 256);
|
||||
_hash_fn_t hashFn = taosGetDefaultHashFunction(TSDB_DATA_TYPE_BINARY);
|
||||
SSHashObj* buildTable = tSimpleHashInit(buildTableCap, hashFn);
|
||||
for (int32_t i = 0; i < taosArrayGetSize(rightRowLocations); ++i) {
|
||||
|
@ -611,7 +611,7 @@ static int32_t mergeJoinJoinDownstreamTsRanges(SOperatorInfo* pOperator, int64_t
|
|||
leftRowLocations = taosArrayInit(8, sizeof(SRowLocation));
|
||||
leftCreatedBlocks = taosArrayInit(8, POINTER_BYTES);
|
||||
|
||||
SArray* rightRowLocations = taosArrayInit(8, sizeof(SRowLocation));
|
||||
rightRowLocations = taosArrayInit(8, sizeof(SRowLocation));
|
||||
rightCreatedBlocks = taosArrayInit(8, POINTER_BYTES);
|
||||
|
||||
mergeJoinGetDownStreamRowsEqualTimeStamp(pOperator, 0, pJoinInfo->leftCol.slotId, pJoinInfo->pLeft,
|
||||
|
|
|
@ -806,6 +806,10 @@ static int32_t pushDownCondOptJoinExtractTagEqualLogicCond(SJoinLogicNode* pJoin
|
|||
}
|
||||
|
||||
static int32_t pushDownCondOptJoinExtractTagEqualCond(SOptimizeContext* pCxt, SJoinLogicNode* pJoin) {
|
||||
if (NULL == pJoin->pOnConditions) {
|
||||
pJoin->pTagEqualConditions = NULL;
|
||||
return TSDB_CODE_SUCCESS;
|
||||
}
|
||||
if (QUERY_NODE_LOGIC_CONDITION == nodeType(pJoin->pOnConditions) &&
|
||||
LOGIC_COND_TYPE_AND == ((SLogicConditionNode*)(pJoin->pOnConditions))->condType) {
|
||||
return pushDownCondOptJoinExtractTagEqualLogicCond(pJoin);
|
||||
|
|
Loading…
Reference in New Issue