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

[FLINK-37441] Rename factoryHierarchy to typeHierarchy for TypeExtractor #26278

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

beliefer
Copy link
Contributor

@beliefer beliefer commented Mar 9, 2025

What is the purpose of the change

This PR proposes to rename factoryHierarchy to typeHierarchy due to it is just a List<Type> and doesn't related to factory.

Brief change log

Rename factoryHierarchy to typeHierarchy for TypeExtractor

Verifying this change

This change is a trivial rework / code cleanup without any test coverage.

Does this pull request potentially affect one of the following parts:

  • Dependencies (does it add or upgrade a dependency): (no)
  • The public API, i.e., is any changed class annotated with @Public(Evolving): (no)
  • The serializers: (no)
  • The runtime per-record code paths (performance sensitive): (no)
  • Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
  • The S3 file system connector: (no)

Documentation

  • Does this pull request introduce a new feature? (no)

@beliefer beliefer force-pushed the FLINK-37441 branch 3 times, most recently from 52b3287 to ce2414a Compare March 9, 2025 04:48
@beliefer beliefer changed the title [FLINK-37441] Improve the code for TypeExtractor [FLINK-37441] Rename factoryHierarchy to typeHierarchy for TypeExtractor Mar 9, 2025
@flinkbot
Copy link
Collaborator

flinkbot commented Mar 9, 2025

CI report:

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


final List<Type> factoryHierarchy = new ArrayList<>(typeHierarchy);
final TypeInfoFactory<? super OUT> factory = getClosestFactory(factoryHierarchy, t);
final List<Type> newTypeHierarchy = new ArrayList<>(typeHierarchy);
Copy link
Contributor

@davidradl davidradl Mar 9, 2025

Choose a reason for hiding this comment

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

nit: it is not a hierarchy it is a list - if we are changing this why not change to something more representative like candidateTypeList and rename the related variables to be Lists not hierarchy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The typeHierarchy also is a list, so I followed the style.
But I think you said is right, let's use typeHierarchyList and newTypeHierarchyList.

Copy link
Contributor Author

@beliefer beliefer Mar 9, 2025

Choose a reason for hiding this comment

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

After a second thought. I guess the original author use the name typeHierarchy due to the list contains the type information according to the hierarchy.
Such as:
{class java.lang.String, class java.lang.Object}.
So let me temporarily use the name typeHierarchy. I am willing to use typeHierarchyList and newTypeHierarchyList if more reviewer suggest it.

@beliefer
Copy link
Contributor Author

@flinkbot run azure

@beliefer
Copy link
Contributor Author

cc @1996fanrui

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants