You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I searched in the issues and found nothing similar.
Motivation
Currently, many instances rely on TableDescriptor to retrieve table metadata, such as bucket keys, bucket numbers, and primary keys. However, because TableDescriptor is primarily designed for table creation, extracting metadata from it can be cumbersome, as numerous fields are optional. This often leads to lengthy method chains like tableInfo.getTableDescriptor().getTableDistribution().get().getBucketCount().get() just to obtain a bucket number. This approach not only complicates the code but also generates multiple IDE warnings due to forced retrieval from Optionals. It's important to note that once a table is created, it will always have a defined bucket number.
Solution
This issue aims to streamline the process by exclusively using TableInfo to access the metadata of a created table. We will introduce several useful getters to significantly simplify the code, making it more efficient and readable.
Anything else?
No response
Willingness to contribute
I'm willing to submit a PR!
The text was updated successfully, but these errors were encountered:
Search before asking
Motivation
Currently, many instances rely on
TableDescriptor
to retrieve table metadata, such as bucket keys, bucket numbers, and primary keys. However, becauseTableDescriptor
is primarily designed for table creation, extracting metadata from it can be cumbersome, as numerous fields are optional. This often leads to lengthy method chains liketableInfo.getTableDescriptor().getTableDistribution().get().getBucketCount().get()
just to obtain a bucket number. This approach not only complicates the code but also generates multiple IDE warnings due to forced retrieval from Optionals. It's important to note that once a table is created, it will always have a defined bucket number.Solution
This issue aims to streamline the process by exclusively using
TableInfo
to access the metadata of a created table. We will introduce several useful getters to significantly simplify the code, making it more efficient and readable.Anything else?
No response
Willingness to contribute
The text was updated successfully, but these errors were encountered: