Skip to content

[SPARK-26526][SQL][TEST] Fix invalid test case about non-deterministic expression #23440

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 2 commits into from

Conversation

LinhongLiu
Copy link
Contributor

What changes were proposed in this pull request?

Test case in SPARK-10316 is used to make sure non-deterministic Filter won't be pushed through Project
But in current code base this test case can't cover this purpose.
Change LogicalRDD to HadoopFsRelation can fix this issue.

How was this patch tested?

Modified test pass.

@LinhongLiu
Copy link
Contributor Author

cc @cloud-fan , this pr fixes issue in #8486 (comment)

@@ -1398,11 +1398,15 @@ class DataFrameSuite extends QueryTest with SharedSQLContext {
}

test("SPARK-10316: respect non-deterministic expressions in PhysicalOperation") {
val input = spark.read.json((1 to 10).map(i => s"""{"id": $i}""").toDS())
withTempDir { dir =>
val tempJsonFile = new File(dir, "tmp_json")
Copy link
Contributor

Choose a reason for hiding this comment

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

we can use withTempPath and write to the path directly.

@cloud-fan
Copy link
Contributor

ok to test

@SparkQA
Copy link

SparkQA commented Jan 3, 2019

Test build #100698 has finished for PR 23440 at commit b44cccc.

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

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@cloud-fan cloud-fan closed this in f65dc95 Jan 4, 2019
@SparkQA
Copy link

SparkQA commented Jan 4, 2019

Test build #100713 has finished for PR 23440 at commit d9adc00.

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

jackylee-ch pushed a commit to jackylee-ch/spark that referenced this pull request Feb 18, 2019
…c expression

## What changes were proposed in this pull request?

Test case in SPARK-10316 is used to make sure non-deterministic `Filter` won't be pushed through `Project`
But in current code base this test case can't cover this purpose.
Change LogicalRDD to HadoopFsRelation can fix this issue.

## How was this patch tested?

Modified test pass.

Closes apache#23440 from LinhongLiu/fix-test.

Authored-by: Liu,Linhong <liulinhong@baidu.com>
Signed-off-by: Wenchen Fan <wenchen@databricks.com>
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.

3 participants