Skip to content

Conversation

@dust1
Copy link
Contributor

@dust1 dust1 commented Aug 3, 2023

Rationale

close #341

Detailed Changes

I just change supports_filter_pushdown in TableProvider to return TableProviderFilterPushDown::Exact to fix this

Test Plan

pass

@dust1
Copy link
Contributor Author

dust1 commented Aug 6, 2023

This issue seems to have been fixed in other pr🤔

@jiacai2050
Copy link
Contributor

Don't worry, the original issue isn't fixed, I will look into why we can't change to Exact directly.

@jiacai2050
Copy link
Contributor

jiacai2050 commented Aug 7, 2023

I have found the cause why those case failed, in #605 we only allow pushdown primary key filters, so we cannot directly change to Exact here.

@dust1
Copy link
Contributor Author

dust1 commented Aug 7, 2023

ok, I'll check other places to fix the problem

@jiacai2050
Copy link
Contributor

jiacai2050 commented Aug 8, 2023

If we want to return Exact here, we need to ensure following cases are met:

  1. The table is in overwrite mode, and the filter only contains primary key
  2. The table is in append mode

For case 2, you need to update check_and_build_predicate_from_filters to pushdown all filters.
https://github.com/CeresDB/ceresdb/blob/ae17b1f6322fbf3abcc23386d685128b28c1a532/table_engine/src/provider.rs#L186

@jiacai2050
Copy link
Contributor

@dust1 Your implementation is fine, I will fix CI failed based on your code, please don't push again.

@dust1
Copy link
Contributor Author

dust1 commented Aug 9, 2023

Well, I was gonna fix it later😂

@jiacai2050
Copy link
Contributor

jiacai2050 commented Aug 9, 2023

You can try other issue first, I want to verify this in one of my deployment first.

@jiacai2050 jiacai2050 changed the title edit: remove filter plan node in pipeline feat: remove filter plan node in pipeline Aug 9, 2023
Copy link
Contributor

@jiacai2050 jiacai2050 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jiacai2050 jiacai2050 merged commit 50b8f77 into apache:main Aug 9, 2023
@dust1 dust1 deleted the issue341 branch August 10, 2023 02:31
jiacai2050 added a commit that referenced this pull request Aug 15, 2023
## Rationale
Followup PR of #1126, remove hard code condition check .

## Detailed Changes
- Add `support_pushdown` 
- Replace unique_keys with is_unique_column to avoid unnecessary Vec
allocate.
- Remove old memory table pushdown tests, all memory table shouldn't
support pushdown. Pushdown check is ensured in
`integration_tests/cases/common/dml/issue-341.sql`


## Test Plan
Existing tests

---------

Co-authored-by: WEI Xikai <ShiKaiWi@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove filter plan node in pipeline

2 participants