Skip to content

Find minimal col dim when its not provided #1295

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

Closed
wants to merge 1 commit into from

Conversation

henrylhtsang
Copy link
Contributor

Summary:
This diff has two parts.

In the first part, we handle the case when the per table base_dim is not given. We use a for loop for find the base_dim that is at least 128, divides the table dim, and is divisible by 4. This helps with the case when the table dim is not divisible by 128, since in that case the current code would just use the table dim.

In the second part, we replace col_wise_shard_dim with _find_base_dim(col_wise_shard_dim, columns). In cases where col_wise_shard_dim is correctly provided, this does nothing. But this allows the user to put in a more flexible col_wise_shard_dim. For example, the users can just put in col_wise_shard_dim = 40 for all tables, and the planner will find the per table base dim that (1) divides the table dim, (2) is divisible by 4 and (3) is larger than or equal to 40.

Differential Revision: D47887146

Summary:
This diff has two parts.

In the first part, we handle the case when the per table base_dim is not given. We use a for loop for find the base_dim that is at least 128, divides the table dim, and is divisible by 4. This helps with the case when the table dim is not divisible by 128, since in that case the current code would just use the table dim.

In the second part, we replace `col_wise_shard_dim` with `_find_base_dim(col_wise_shard_dim, columns)`. In cases where `col_wise_shard_dim` is correctly provided, this does nothing. But this allows the user to put in a more flexible `col_wise_shard_dim`. For example, the users can just put in `col_wise_shard_dim = 40` for all tables, and the planner will find the per table base dim that (1) divides the table dim, (2) is divisible by 4 and (3) is larger than or equal to 40.

Differential Revision: D47887146

fbshipit-source-id: 1dfb56e6254a0957cbc7ab5a4bbbdca9590b4ba9
@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported labels Aug 1, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D47887146

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants