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-27080][SQL]bug fix: mergeWithMetastoreSchema with uniform lower case comparison #24001

Closed
wants to merge 1 commit into from

Conversation

codeborui
Copy link

@codeborui codeborui commented Mar 7, 2019

What changes were proposed in this pull request?

When reading parquet file with merging metastore schema and file schema, we should compare field names using uniform case. In current implementation, lowercase is used but one omission. And this patch fix it.

How was this patch tested?

Unit test

@codeborui
Copy link
Author

@xuanyuanking

@srowen
Copy link
Member

srowen commented Mar 7, 2019

Looks plausible, given the map keys are definitely lower-case. This doesn't modify the names that are returned in the schema. Maybe @cloud-fan ?

@cloud-fan
Copy link
Contributor

ok to test

@cloud-fan
Copy link
Contributor

LGTM

@SparkQA
Copy link

SparkQA commented Mar 8, 2019

Test build #103207 has finished for PR 24001 at commit dec978d.

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

Copy link
Member

@xuanyuanking xuanyuanking left a comment

Choose a reason for hiding this comment

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

Nice job Bo, +1 for me, cc @cloud-fan, we found this during query service upgrade in Baidu.

@cloud-fan cloud-fan closed this in a29df5f Mar 9, 2019
cloud-fan pushed a commit that referenced this pull request Mar 9, 2019
…er case comparison

When reading parquet file with merging metastore schema and file schema, we should compare field names using uniform case. In current implementation, lowercase is used but one omission. And this patch fix it.

Unit test

Closes #24001 from codeborui/mergeSchemaBugFix.

Authored-by: CodeGod <>
Signed-off-by: Wenchen Fan <[email protected]>
(cherry picked from commit a29df5f)
Signed-off-by: Wenchen Fan <[email protected]>
cloud-fan pushed a commit that referenced this pull request Mar 9, 2019
…er case comparison

When reading parquet file with merging metastore schema and file schema, we should compare field names using uniform case. In current implementation, lowercase is used but one omission. And this patch fix it.

Unit test

Closes #24001 from codeborui/mergeSchemaBugFix.

Authored-by: CodeGod <>
Signed-off-by: Wenchen Fan <[email protected]>
(cherry picked from commit a29df5f)
Signed-off-by: Wenchen Fan <[email protected]>
@cloud-fan
Copy link
Contributor

thanks, merging to master/2.4/2.3

kai-chi pushed a commit to kai-chi/spark that referenced this pull request Jul 23, 2019
…er case comparison

When reading parquet file with merging metastore schema and file schema, we should compare field names using uniform case. In current implementation, lowercase is used but one omission. And this patch fix it.

Unit test

Closes apache#24001 from codeborui/mergeSchemaBugFix.

Authored-by: CodeGod <>
Signed-off-by: Wenchen Fan <[email protected]>
(cherry picked from commit a29df5f)
Signed-off-by: Wenchen Fan <[email protected]>
kai-chi pushed a commit to kai-chi/spark that referenced this pull request Jul 25, 2019
…er case comparison

When reading parquet file with merging metastore schema and file schema, we should compare field names using uniform case. In current implementation, lowercase is used but one omission. And this patch fix it.

Unit test

Closes apache#24001 from codeborui/mergeSchemaBugFix.

Authored-by: CodeGod <>
Signed-off-by: Wenchen Fan <[email protected]>
(cherry picked from commit a29df5f)
Signed-off-by: Wenchen Fan <[email protected]>
kai-chi pushed a commit to kai-chi/spark that referenced this pull request Aug 1, 2019
…er case comparison

When reading parquet file with merging metastore schema and file schema, we should compare field names using uniform case. In current implementation, lowercase is used but one omission. And this patch fix it.

Unit test

Closes apache#24001 from codeborui/mergeSchemaBugFix.

Authored-by: CodeGod <>
Signed-off-by: Wenchen Fan <[email protected]>
(cherry picked from commit a29df5f)
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.

5 participants