Merged
Conversation
Supports generics over the source type, so that one can override/customize the pushdown logic for operators, scalar values, etc.
mildbyte
approved these changes
Nov 29, 2022
| #[case::complex_binary_expression( | ||
| or(and(or(col("a").eq(lit(1)), col("b").gt(lit(10))), col("c").lt_eq(lit(15.0))), col("d").not_eq(lit("some_string"))), | ||
| "(a = 1 OR b > 10) AND c <= 15 OR d != 'some_string'") | ||
| ] |
Contributor
There was a problem hiding this comment.
Can you also add a couple of tests here for:
- strings with single quotes in them
- timestamps
- column names with spaces getting quoted properly
(they won't be integration tests but we'll be able to have some cases for them being escaped / serialized correctly)
Contributor
|
Thanks! :) |
mildbyte
approved these changes
Nov 30, 2022
| SourceType::MySQL => filter_expr_to_sql(filter, MySQLFilterPushdown {}), | ||
| _ => { | ||
| debug!( | ||
| "Filter not shipable due to unsupported source type {:?}", |
Contributor
There was a problem hiding this comment.
Suggested change
| "Filter not shipable due to unsupported source type {:?}", | |
| "Filter not shippable due to unsupported source type {:?}", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implement a FDW-like mechanism to enable pushdown of filter qualifiers to a remote data source as an optimization to skip redundant row fetching over the network.
The mechanism is based on the DataFusion
ExpressionVisitor, which allows us to walk the filter expression AST, and determine if all entities are ship-able, and if so convert them if needed to the source native form. The conversion and the entire ship-ability logic is customizable.Closes #224.