Skip to content

Add filter check for JDBC pushdown unit tests#16864

Merged
highker merged 1 commit intoprestodb:masterfrom
highker:mysql
Oct 13, 2021
Merged

Add filter check for JDBC pushdown unit tests#16864
highker merged 1 commit intoprestodb:masterfrom
highker:mysql

Conversation

@highker
Copy link

@highker highker commented Oct 13, 2021

JDBC filter pushdown always needs to preserve the original filter for
correctness. This is to prevent regressions like #16412 where filters
are partially pushed down and there is no guard on Presto side.

== NO RELEASE NOTE ==

JDBC filter pushdown always needs to preserve the original filter for
correctness. This is to prevent regressions like prestodb#16412 where filters
are partially pushed down and there is no guard on Presto side.
Copy link

@arunthirupathi arunthirupathi left a comment

Choose a reason for hiding this comment

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

Looks good.

There were unrelated resource manager tests failing.

Copy link
Contributor

@NikhilCollooru NikhilCollooru left a comment

Choose a reason for hiding this comment

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

LGTM

@highker highker requested a review from rongrong October 13, 2021 19:29

// we always enforce the original filter to be present
// the following assertPlan will guarantee the completeness of the filter
if (node instanceof FilterNode && node.getSources().get(0) instanceof TableScanNode) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to also check that the filter matches?

Copy link
Author

Choose a reason for hiding this comment

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

Ya, the filter match will be checked by the following assertPlan. As long as filterNode is present, it will check.

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.

5 participants