Skip to content

[SPARK-16939][SQL] Fix build error by using Tuple1 explicitly in StringFunctionsSuite #14526

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ class StringFunctionsSuite extends QueryTest with SharedSQLContext {
}

test("non-matching optional group") {
val df = Seq("aaaac").toDF("s")
val df = Seq(Tuple1("aaaac")).toDF("s")
Copy link
Member

Choose a reason for hiding this comment

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

OK, I guess that Scala 2.11 has an implicit conversion that Scala 2.10 does not that would make this conversion automatically, hence the PR builder succeeded. We could also just add a dummy column in the example, but I suppose this is the best way to ensure that the fix works in 1.6, and also makes the test a little more robust. LGTM, thanks.

Copy link
Member Author

Choose a reason for hiding this comment

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

Thank you, @srowen .

checkAnswer(
df.select(regexp_extract($"s", "(a+)(b)?(c)", 2)),
Row("")
Expand Down