Skip to content

2.25.0.0-b420

Summary:
There are several places in code where pushdown is bound to Dml. The code looks like

```
if (rel_pushdown != NULL)
{
	YbDmlAppendQuals(rel_pushdown->quals, true /* is_primary */, ybScan->handle);
	YbDmlAppendColumnRefs(rel_pushdown->colrefs, true /* is_primary */, ybScan->handle);
}
if (idx_pushdown != NULL)
{
	YbDmlAppendQuals(idx_pushdown->quals, false /* is_primary */, ybScan->handle);
	YbDmlAppendColumnRefs(idx_pushdown->colrefs, false /* is_primary */, ybScan->handle);
}
```

It is reasonable to create helper function to make same code look like

```
YbApplyPrimaryPushdown(ybScan->handle, rel_pushdown);
YbApplySecondaryIndexPushdown(ybScan->handle, idx_pushdown);
```

**Note:**
In context of this diff some code polishing is performed in the `PgDml`/`PgDmlRead`/`PgDmlWrite`:
- `AppendQual` is moved from `PgDml` to `PgDmlRead`
- 2 virtual methods `PgDml::ClearColRefPBs` and `PgDml::AllocColRefPB` are substituted with the single one `PgDml::ColRefPBs` which returns reference to `ArenaList`
Jira: DB-14312

Test Plan: Jenkins

Reviewers: amartsinchyk, telgersma

Reviewed By: telgersma

Subscribers: yql

Tags: #jenkins-ready

Differential Revision: https://phorge.dev.yugabyte.com/D40401
Assets 2
Loading