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

Ensure that number_of_files is int #15

Merged
merged 1 commit into from
Nov 8, 2023

Conversation

mjurkus
Copy link
Collaborator

@mjurkus mjurkus commented Nov 8, 2023

The table_size_in_mb = self.client.get_table(table).num_bytes / 1024 / 1024 operation might produce a float.

@@ -581,7 +581,7 @@ def to_remote_storage(self) -> List[str]:
table_size_in_mb = self.client.get_table(table).num_bytes / 1024 / 1024
number_of_files = max(
1,
table_size_in_mb // self.config.offline_store.gcs_staging_file_size_mb,
int(table_size_in_mb // self.config.offline_store.gcs_staging_file_size_mb),

Choose a reason for hiding this comment

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

At this point you could also just use simple division (/ instead of //) 😁

@mjurkus mjurkus merged commit 8452624 into ml_platfrom_v034 Nov 8, 2023
13 of 15 checks passed
@mjurkus mjurkus deleted the feature/fix_file_size_calc branch November 8, 2023 13:03
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.

4 participants