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

[#1908] Fix: In HadoopCatalogOperations.java field entity is not used #4350

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

poojatalele
Copy link

What changes were proposed in this pull request?

Removed the unused entity variable in the alterSchema method of HadoopCatalogOperations.java. The refactored code now directly updates the schema and retrieves the updated schema entity for returning.

Why are the changes needed?

The entity variable was assigned but never used, which was flagged as a possible bug.
Removing this unused variable makes the code cleaner and easier to maintain.

Fix: #1908

Does this PR introduce any user-facing change?

No, this PR does not introduce any user-facing changes.

How was this patch tested?

  1. Ensured all existing tests related to schema operations pass successfully.
  2. Manually verified the functionality of schema updates to confirm no regressions were introduced.

@yuqi1129
Copy link
Contributor

yuqi1129 commented Aug 5, 2024

@poojatalele
Please resolve the code format problem, more detail can be seen in the output of CI.

@poojatalele
Copy link
Author

poojatalele commented Aug 5, 2024

@poojatalele Please resolve the code format problem, more detail can be seen in the output of CI.

@yuqi1129
Can you please help me with this?

@justinmclean
Copy link
Member

You ned to run ./gradlew :catalogs:catalog-hadoop:spotlessApply and commit the changes to fix the CI issue.

@poojatalele
Copy link
Author

poojatalele commented Aug 7, 2024

You ned to run ./gradlew :catalogs:catalog-hadoop:spotlessApply and commit the changes to fix the CI issue.

Pls check now once
@justinmclean

@poojatalele
Copy link
Author

You ned to run ./gradlew :catalogs:catalog-hadoop:spotlessApply and commit the changes to fix the CI issue.

Pls check now once @justinmclean

Any update?

Entity.EntityType.SCHEMA,
schemaEntity -> updateSchemaEntity(ident, schemaEntity, changes));

SchemaEntity entity = store.get(ident, Entity.EntityType.SCHEMA, SchemaEntity.class);
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure why do you add this line of code here, can you explain more?

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.

[Improvement] In HadoopCatalogOperations.java field entity is not used
4 participants