Skip to content
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-23500][SQL][FOLLOWUP] Fix complex type simplification rules to apply to entire plan #20911

Closed
wants to merge 4 commits into from

Conversation

gatorsmile
Copy link
Member

What changes were proposed in this pull request?

This PR is to improve the test coverage of the original PR #20687

How was this patch tested?

N/A

import org.apache.spark.sql.catalyst.plans.logical.LogicalPlan
import org.apache.spark.sql.test.SharedSQLContext

class ComplexTypesSuite extends QueryTest with SharedSQLContext {
Copy link
Member Author

Choose a reason for hiding this comment

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

Currently, it majorly covers the end-to-end test cases of named_struct. In the future, we can add more about the others.

@SparkQA
Copy link

SparkQA commented Mar 27, 2018

Test build #88621 has finished for PR 20911 at commit e4c1559.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • class ComplexTypesSuite extends QueryTest with SharedSQLContext

}

test("SPARK-23500: do not simplify maps in Aggregate expressions") {
// This could be done if we had a more complex rule that checks that
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 merge it with the previous test case?

numFields = 1,
containsNull = false),
ordinal = 1) as "a2")
.where('id > 0L)
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 use sort? We are trying to test when the complex expressions are not in the root node. It's hard to say if we push filter through project or not.

Copy link
Member Author

Choose a reason for hiding this comment

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

sure, let me get rid of it.

@SparkQA
Copy link

SparkQA commented Mar 28, 2018

Test build #88654 has finished for PR 20911 at commit ec47077.

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

@cloud-fan
Copy link
Contributor

retest this please

@SparkQA
Copy link

SparkQA commented Mar 28, 2018

Test build #88658 has finished for PR 20911 at commit ec47077.

  • This patch fails from timeout after a configured wait of `300m`.
  • This patch merges cleanly.
  • This patch adds no public classes.

@gatorsmile
Copy link
Member Author

@henryr

@SparkQA
Copy link

SparkQA commented Mar 30, 2018

Test build #88720 has finished for PR 20911 at commit 888645e.

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

.select(
GetMapValue('m, "r1") as "a1",
GetMapValue('m, "r32") as "a2")
.where('id > 0L)
Copy link
Contributor

Choose a reason for hiding this comment

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

can we use sort here too?

@cloud-fan
Copy link
Contributor

LGTM

@SparkQA
Copy link

SparkQA commented Mar 30, 2018

Test build #88740 has finished for PR 20911 at commit 5b990e5.

  • 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 bc8d093 Mar 30, 2018
mshtelma pushed a commit to mshtelma/spark that referenced this pull request Apr 5, 2018
… apply to entire plan

## What changes were proposed in this pull request?
This PR is to improve the test coverage of the original PR apache#20687

## How was this patch tested?
N/A

Author: gatorsmile <[email protected]>

Closes apache#20911 from gatorsmile/addTests.
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