-
Notifications
You must be signed in to change notification settings - Fork 28.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-8264][SQL]add substring_index function #7843
Conversation
Test build #39285 has finished for PR 7843 at commit
|
Test build #39288 has finished for PR 7843 at commit
|
@rxin This is ready to review |
@@ -154,6 +154,63 @@ class StringFunctionsSuite extends QueryTest { | |||
Row(1)) | |||
} | |||
|
|||
test("string substring_index function") { | |||
val df = Seq(("www.apache.org", ".", "zz")).toDF("a", "b", "c") | |||
checkAnswer( |
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.
we can remove some of these tests since here we are mostly testing whether things work end to end, rather than unit testing all corner cases.
@davies is the behavior to return the entire string if there is not enough number of occurrence of the delimiter? LGTM other than this question. |
@rxin I think so. |
Merging in master. When you submit your next patch for something else, just delete some of the tests in StringFunctionsSuite. |
This PR is based on #7533 , thanks to @zhichao-li
Closes #7533