Github user viirya commented on the pull request:
https://github.com/apache/spark/pull/5309#issuecomment-89335999
@chenghao-intel as the comment of `StringComparison` is:
> A base trait for functions that compare two strings, returning a boolean
Because it compares two strings and returns a boolean value, it is more
like a `BinaryPredicate ` other than just a `BinaryExpression`.
For the unit tests, the original unit tests are wrong. E.g., the test
`"SELECT a, b, c FROM oneToTenFiltered WHERE c like '%d'"` should be used to
test `StringEndsWith`, but `%d` should be `d%` here.
The original test data for column `c` is some strings like `aaaaaaaa`,
`bbbbbbbb`, etc. So `%d` and `d%` both works to get the expected row. It is
modified to something like `aaaaAAAA` for differentiating the tests of
`StringStartsWith`, `StringEndsWith` and `StringContains`.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]