Skip to content

Conversation

@wangxianghu
Copy link
Contributor

…olumns from schema

Tips

What is the purpose of the pull request

Introduce DropColumnSchemaPostProcessor to support drop columns from schema

Verify this pull request

This pull request is already covered by existing tests, such as (please describe tests).
org.apache.hudi.utilities.TestSchemaPostProcessor#testDeleteColumn
org.apache.hudi.utilities.TestSchemaPostProcessor#testDeleteColumnThrows

Committer checklist

  • Has a corresponding JIRA in PR title & commit

  • Commit message is descriptive of the change

  • CI is green

  • Necessary doc changes done or have another open PR

  • For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

@wangxianghu wangxianghu changed the title [HUDI-3522] Introduce DropColumnSchemaPostProcessor to support drop c… [HUDI-3522] Introduce DropColumnSchemaPostProcessor to support drop columns from schema Mar 7, 2022
@nsivabalan nsivabalan added the priority:medium Moderate impact; usability gaps label Mar 7, 2022
@wangxianghu
Copy link
Contributor Author

@hudi-bot run azure

@wangxianghu
Copy link
Contributor Author

hi @XuQianJin-Stars, could you please help review this as well ?

Copy link
Contributor

@pratyakshsharma pratyakshsharma left a comment

Choose a reason for hiding this comment

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

Changes look good to me overall. Minor comments. Please address them.

@wangxianghu
Copy link
Contributor Author

Changes look good to me overall. Minor comments. Please address them.

@pratyakshsharma thanks for you review, I have addressed all your concern, please take another look when free

@pratyakshsharma
Copy link
Contributor

Thank you for another useful processor @wangxianghu . Will merge once the CI passes.

@wangxianghu
Copy link
Contributor Author

@hudi-bot run azure

1 similar comment
@wangxianghu
Copy link
Contributor Author

@hudi-bot run azure

@hudi-bot
Copy link
Collaborator

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@wangxianghu wangxianghu merged commit 83cff3a into apache:master Mar 11, 2022
List<Schema.Field> targetFields = new LinkedList<>();

for (Schema.Field sourceField : sourceFields) {
if (!columnsToDelete.contains(sourceField.name().toLowerCase(Locale.ROOT))) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Avro schema fields are actually case sensitive. I was reading about this today. But in practical world, any table should not have column names which differ only in case sensitivity. So this conversion to lower case should not break anything.

vingov pushed a commit to vingov/hudi that referenced this pull request Apr 3, 2022
…olumns from schema (apache#4972)

* [HUDI-3522] Introduce DropColumnSchemaPostProcessor to support drop columns from schema

* Fix case sensitivity
stayrascal pushed a commit to stayrascal/hudi that referenced this pull request Apr 12, 2022
…olumns from schema (apache#4972)

* [HUDI-3522] Introduce DropColumnSchemaPostProcessor to support drop columns from schema

* Fix case sensitivity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

priority:medium Moderate impact; usability gaps

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants