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

fix: same numbers everywhere #21848

Merged
merged 7 commits into from
Apr 25, 2024
Merged

fix: same numbers everywhere #21848

merged 7 commits into from
Apr 25, 2024

Conversation

pauldambra
Copy link
Member

@pauldambra pauldambra commented Apr 25, 2024

at some point we started with ceil and moved to round

or maybe just never consistently used them

certainly right now ingestion does round(value/16) and queries assume either value/16 or round(value/16)

🙈

this moves all the python and clickhouse calculations to assume round(value/16) so we've the same everywhere

Comment on lines -166 to -167
"viewport_width_min": "viewport_width >= ceil({viewport_width_min} / 16)",
"viewport_width_max": "viewport_width <= ceil({viewport_width_max} / 16)",
Copy link
Member Author

Choose a reason for hiding this comment

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

on the query side this is the only change

Comment on lines -309 to -314
"x": 10 / 16,
"y": y / 16,
"x": round(x / 16),
"y": round(y / 16),
"scale_factor": 16,
# this adjustment is done at ingestion
"viewport_width": math.ceil(viewport_width / 16),
"viewport_height": math.ceil(viewport_height / 16),
Copy link
Member Author

Choose a reason for hiding this comment

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

but the test input data doesn't have the same shape as the real ingestion will generate

@pauldambra pauldambra marked this pull request as ready for review April 25, 2024 13:36
Copy link
Contributor

@benjackwhite benjackwhite left a comment

Choose a reason for hiding this comment

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

makes sense

@pauldambra pauldambra merged commit 3a7646b into master Apr 25, 2024
97 checks passed
@pauldambra pauldambra deleted the fix/same-numbers-everywhere branch April 25, 2024 15:08
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.

2 participants