Skip to content

Conversation

@xuanyuanking
Copy link
Member

What changes were proposed in this pull request?

As comment in #22326 (comment), we test the new added optimizer rule by end-to-end test in python side, need to add suites under org.apache.spark.sql.catalyst.optimizer like other optimizer rules.

How was this patch tested?

new added UT

@SparkQA
Copy link

SparkQA commented Nov 6, 2018

Test build #98515 has finished for PR 22955 at commit 344b516.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • class PullOutPythonUDFInJoinConditionSuite extends PlanTest

@xuanyuanking
Copy link
Member Author

cc @cloud-fan @mgaido91

@mgaido91
Copy link
Contributor

mgaido91 commented Nov 7, 2018

shall we also remove the end-to-end tests which are now not needed anymore?

@xuanyuanking
Copy link
Member Author

Thanks for the reply, unnecessary end-to-end tests removed in 2b6977d, others maybe should be kept? Cause mock python udf in scala side can't 100% same with python side.

}
}

test("python udf with other common condition") {
Copy link
Contributor

Choose a reason for hiding this comment

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

shall we add more cases like this for Or instead of And? And with several UDF/other conditions? 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.

Thanks, add more cases in 38b1555.

@SparkQA
Copy link

SparkQA commented Nov 9, 2018

Test build #98644 has finished for PR 22955 at commit 38b1555.

  • This patch fails due to an unknown error code, -9.
  • This patch merges cleanly.
  • This patch adds no public classes.

@mgaido91
Copy link
Contributor

retest this please

condition = None).where(pythonUDF).analyze
val unsupportedJoinTypes = Seq(LeftOuter, RightOuter, FullOuter, LeftAnti)

private def comparePlansWithConf(query: LogicalPlan, expected: LogicalPlan): Unit = {
Copy link
Contributor

Choose a reason for hiding this comment

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

better naming? what does it mean WithConf?

Copy link
Member Author

Choose a reason for hiding this comment

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

how about comparePlanWithCrossJoinEnable? Just afraid it's too long at first, any advise :) Thanks.

}
}

test("inner join condition with python udf only") {
Copy link
Contributor

Choose a reason for hiding this comment

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

sorry, probably I was not clear enough in my previous comment. This UT and the following differ only for the join type. We can dedup them by doing something like:

Seq(Inner, LeftSemi).foreach { joinType =>
  test(...) { ...}
}

PS nit: maybe we can also define a new val supportedJoinTypes = Seq(Inner, LeftSemi)...

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm sorry for lacking of comments to your previous comment they differ only by the join type..., they differ not only the type, but also the expected plan.

@SparkQA
Copy link

SparkQA commented Nov 10, 2018

Test build #98676 has finished for PR 22955 at commit 38b1555.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Nov 11, 2018

Test build #98698 has finished for PR 22955 at commit 8d04b4c.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@asfgit asfgit closed this in d0ae484 Nov 12, 2018
@xuanyuanking
Copy link
Member Author

Thanks @mgaido91 @cloud-fan

@xuanyuanking xuanyuanking deleted the SPARK-25949 branch November 12, 2018 12:15
jackylee-ch pushed a commit to jackylee-ch/spark that referenced this pull request Feb 18, 2019
## What changes were proposed in this pull request?

As comment in apache#22326 (comment), we test the new added optimizer rule by end-to-end test in python side, need to add suites under `org.apache.spark.sql.catalyst.optimizer` like other optimizer rules.

## How was this patch tested?
new added UT

Closes apache#22955 from xuanyuanking/SPARK-25949.

Authored-by: Yuanjian Li <[email protected]>
Signed-off-by: Wenchen Fan <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants