Skip to content

Conversation

@jiangxb1987
Copy link
Contributor

What changes were proposed in this pull request?

Inside OptimizeMetadataOnlyQuery.getPartitionAttrs, avoid using zip to generate attribute map.
Also include other minor update of comments and format.

How was this patch tested?

Existing test cases.

@jiangxb1987
Copy link
Contributor Author

cc @gatorsmile @cloud-fan

@hvanhovell
Copy link
Contributor

hvanhovell commented Feb 28, 2018

LGTM - pending jenkins

@SparkQA
Copy link

SparkQA commented Feb 28, 2018

Test build #87775 has finished for PR 20693 at commit a3cf3ca.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class LocalRelation(output: Seq[Attribute],

data: Seq[InternalRow] = Nil,
// Indicates whether this relation has data from a streaming source.
override val isStreaming: Boolean = false)
case class LocalRelation(output: Seq[Attribute],
Copy link
Contributor

Choose a reason for hiding this comment

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

although we should not include this style change in the original commit, since it's already there, let's not bother about reverting it back.

@cloud-fan
Copy link
Contributor

retest this please

@cloud-fan
Copy link
Contributor

LGTM

Copy link
Member

@gatorsmile gatorsmile left a comment

Choose a reason for hiding this comment

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

LGTM

@SparkQA
Copy link

SparkQA commented Feb 28, 2018

Test build #87783 has finished for PR 20693 at commit a3cf3ca.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class LocalRelation(output: Seq[Attribute],

@SparkQA
Copy link

SparkQA commented Feb 28, 2018

Test build #87787 has finished for PR 20693 at commit 0a3d84a.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds the following public classes (experimental):
  • case class LocalRelation(

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM.

@asfgit asfgit closed this in 25c2776 Feb 28, 2018
gatorsmile pushed a commit to gatorsmile/spark that referenced this pull request Mar 7, 2018
## What changes were proposed in this pull request?

Inside `OptimizeMetadataOnlyQuery.getPartitionAttrs`, avoid using `zip` to generate attribute map.
Also include other minor update of comments and format.

## How was this patch tested?

Existing test cases.

Author: Xingbo Jiang <[email protected]>

Closes apache#20693 from jiangxb1987/SPARK-23523.
asfgit pushed a commit that referenced this pull request Mar 13, 2018
…he rule OptimizeMetadataOnlyQuery

This PR is to backport #20684 and #20693 to Spark 2.3 branch

---

## What changes were proposed in this pull request?
```Scala
val tablePath = new File(s"${path.getCanonicalPath}/cOl3=c/cOl1=a/cOl5=e")
 Seq(("a", "b", "c", "d", "e")).toDF("cOl1", "cOl2", "cOl3", "cOl4", "cOl5")
 .write.json(tablePath.getCanonicalPath)
 val df = spark.read.json(path.getCanonicalPath).select("CoL1", "CoL5", "CoL3").distinct()
 df.show()
```

It generates a wrong result.
```
[c,e,a]
```

We have a bug in the rule `OptimizeMetadataOnlyQuery `. We should respect the attribute order in the original leaf node. This PR is to fix it.

## How was this patch tested?
Added a test case

Author: Xingbo Jiang <[email protected]>
Author: gatorsmile <[email protected]>

Closes #20763 from gatorsmile/backport23523.
peter-toth pushed a commit to peter-toth/spark that referenced this pull request Oct 6, 2018
## What changes were proposed in this pull request?

Inside `OptimizeMetadataOnlyQuery.getPartitionAttrs`, avoid using `zip` to generate attribute map.
Also include other minor update of comments and format.

## How was this patch tested?

Existing test cases.

Author: Xingbo Jiang <[email protected]>

Closes apache#20693 from jiangxb1987/SPARK-23523.
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.

6 participants