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

chore(query-service): update GoValuateFuncs definitions #5106

Merged
merged 5 commits into from
May 31, 2024

Conversation

prashant-shahi
Copy link
Member

@prashant-shahi prashant-shahi commented May 29, 2024

Summary

  • Fixed now function
  • Remove toUnixTimestamp query-builder function which was breaking - we shall bring this back if the need arises for any customers for computing timestamp query with static date string values.

If you had any queries using toUnixTimestamp(now()), you can use now() instead.

Related Issues / PR's

Related to #4877

Affected Areas and Manually Tested Areas

Any query using toUnixTimestamp or now.

Signed-off-by: Prashant Shahi [email protected]

@github-actions github-actions bot added the bug Something isn't working label May 29, 2024
srikanthccv
srikanthccv previously approved these changes May 29, 2024
@srikanthccv
Copy link
Member

Since A - now() is not working. I don't think this will fix it because the error says mismatched data type.

@prashant-shahi
Copy link
Member Author

yeah, this will not fix that issue.

@srikanthccv
Copy link
Member

Please update the funtions GoValuateFuncs["now"] and GoValuateFuncs["toUnixTimestamp"] to return a float64 value and check.

@prashant-shahi
Copy link
Member Author

Please update the funtions GoValuateFuncs["now"] and GoValuateFuncs["toUnixTimestamp"] to return a float64 value and check.

I have done the exact same thing locally. Testing it now. 😄

srikanthccv
srikanthccv previously approved these changes May 31, 2024
@prashant-shahi prashant-shahi changed the title fix: parse both unix int and RFC3339 string in toUnixTimestamp chore(query-service): update GoValuateFuncs definitions May 31, 2024
@prashant-shahi prashant-shahi merged commit 0f9c8d9 into develop May 31, 2024
15 checks passed
@prashant-shahi prashant-shahi deleted the fix/toUnixTimestamp branch May 31, 2024 15:52
@prashant-shahi
Copy link
Member Author

prashant-shahi commented Jun 8, 2024

GoValuateFuncs["toUnixTimestamp"] = func(args ...interface{}) (interface{}, error) {

@srikanthccv If the returned value always needs to float64 for queries to work, can we update it to explicitly return the same in all GoValuteFuncs?

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.

2 participants