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: ignore timestamp from the subquery result for value panel #4293

Merged
merged 1 commit into from
Dec 27, 2023

Conversation

srikanthccv
Copy link
Member

@srikanthccv srikanthccv commented Dec 27, 2023

Summary

We currently use the timestamp from the subquery for the reduced value of select aggregation (last, sum, min, max). This works fine for single query and formulas if all the queries involved in the expression have data for the same time range. For certain cases the most recent data may not exist for all queries involved in formula expression. And join clause on different timestamps returns No Data https://signoz-team.slack.com/archives/C05AXQL92BT/p1703672801446009.

This change fixes the issue by using now() as the common timestamp. The value of timestamp in the value type panel is irrelevant so this doesn't make any difference to correctness.

Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@github-actions github-actions bot added the bug Something isn't working label Dec 27, 2023
Copy link

Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id>

@srikanthccv srikanthccv marked this pull request as ready for review December 27, 2023 13:19
@ankitnayan
Copy link
Collaborator

Irrelevant to the PR:

now() is completely useless? Why do we need it at all?

@srikanthccv
Copy link
Member Author

Why do we need it at all?

We need at least one column for the join key for a valid ClickHouse query and we use this ts as that key. If we move the formula expression logic outside of ClickHouse then there is no need to have ts column.

@srikanthccv
Copy link
Member Author

The way we evaluate the value type panel can be improved a lot. It's also not cache friendly. I think that cleanup deserves its own issue and separate PR. Hence merging.

@srikanthccv srikanthccv merged commit 263ac9f into develop Dec 27, 2023
10 of 12 checks passed
@srikanthccv srikanthccv deleted the fix-value-panel-formula branch December 27, 2023 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants