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

pkg/query: Set different metadata on aggregated row to null #3805

Merged
merged 4 commits into from
Sep 14, 2023

Conversation

metalmatze
Copy link
Member

Whenever we merge/aggregate functions we want to make sure that all meta data columns match with their content.
For example, if the underlying filename is different, we have to set that column's value to null.
This is to avoid showing misleading information.

@metalmatze metalmatze requested a review from a team as a code owner September 13, 2023 16:42
@alwaysmeticulous
Copy link

alwaysmeticulous bot commented Sep 13, 2023

🤖 Meticulous spotted visual differences in 1 of 333 screens tested: view and approve differences detected.

Last updated for commit 4c54b72. This comment will update as new commits are pushed.

@metalmatze metalmatze force-pushed the flamegraph-arrow-setnull branch from c7e297d to a04e9dc Compare September 13, 2023 16:46
@metalmatze
Copy link
Member Author

FrostDB is updated in this PR and the replace in the go.mod is only to get apache/arrow#37695 in. Once that merges we can simply remove that replace too.

if fb.builderFunctionStartLine.IsValid(cr) {
a := fb.builderFunctionStartLine.Value(cr)
b := r.LineFunctionStartLine.Value(lineIndex)
if r.LineFunctionStartLine.IsNull(lineIndex) || a != b {
Copy link
Member

Choose a reason for hiding this comment

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

This is going to be a very extreme hot-path, so we're going to want to first check for null in every one of these branches, as reading the validity bitmap is much faster than reading the values, which we would be doing unnecessarily as is.

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, I can change it proactively as I agree.
I was waiting to see what profiling was going to show.

Copy link
Member

@brancz brancz left a comment

Choose a reason for hiding this comment

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

One tiny last thing, then lgtm

pkg/query/flamegraph_arrow.go Show resolved Hide resolved
@metalmatze metalmatze merged commit 740aa44 into main Sep 14, 2023
@metalmatze metalmatze deleted the flamegraph-arrow-setnull branch September 14, 2023 16:56
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.

2 participants