!2228 新表达式框架已经不使用planstate中targetlist,修复之前的遗漏

Merge pull request !2228 from wanghao19920907/fix_bug2
This commit is contained in:
opengauss-bot 2022-10-11 07:30:59 +00:00 committed by Gitee
commit e717a1ead8
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 2 additions and 3 deletions

View File

@ -9959,8 +9959,7 @@ bool CheckColumnsSuportedByBatchMode(List *targetList, List *qual)
/* Consider the targetList */
foreach (l, targetList) {
ListCell *vl = NULL;
GenericExprState *gstate = (GenericExprState *)lfirst(l);
TargetEntry *tle = (TargetEntry *)gstate->xprstate.expr;
TargetEntry *tle = lfirst_node(TargetEntry, l);
/* if have set-returning function, not support. */
if (vector_engine_setfunc_walker((Node*)tle, NULL)) {

View File

@ -679,7 +679,7 @@ static SeqScanState *ExecInitSeqScanBatchMode(SeqScan *node, SeqScanState* scans
* 4. the relaseion is not a hash bucket relation.
*/
if (node->tablesample ||
!CheckColumnsSuportedByBatchMode(scanstate->ps.targetlist, node->plan.qual) ||
!CheckColumnsSuportedByBatchMode(scanstate->ps.plan->targetlist, node->plan.qual) ||
currentRelation->rd_id < FirstNormalObjectId ||
RELATION_OWN_BUCKET(currentRelation)) {
node->scanBatchMode = false;