-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[spark] Support StringEndsWith filter in SparkFilterConverter #3714
[spark] Support StringEndsWith filter in SparkFilterConverter #3714
Conversation
BinaryString minStr = (BinaryString) min; | ||
BinaryString maxStr = (BinaryString) max; | ||
BinaryString pattern = (BinaryString) patternLiteral; | ||
return (minStr.endsWith(pattern) || minStr.compareTo(pattern) <= 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really works? Can you add more tests?
Endswith does not support range filtering very well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK,had add tests to test it. @JingsongLi
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 with @JingsongLi, does endWith
really have any effect on range filtering?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should add tests in PredicateTest
.
@@ -192,6 +210,11 @@ public void testDate() { | |||
|
|||
@Test | |||
public void testIgnoreFailure() { | |||
testStartsWith(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need modify this, this is only to test convertIgnoreFailure
, regardless of the filter used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK,removed the ut
BinaryString minStr = (BinaryString) min; | ||
BinaryString maxStr = (BinaryString) max; | ||
BinaryString pattern = (BinaryString) patternLiteral; | ||
return (minStr.endsWith(pattern) || minStr.compareTo(pattern) <= 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 with @JingsongLi, does endWith
really have any effect on range filtering?
By the way, since endwith has no range filtering capability, even we pass it to paimon, it has no filtering effect... |
can add test for partition filering |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
Purpose
Linked issue: close #3715
Tests
API and Format
Documentation