-
Notifications
You must be signed in to change notification settings - Fork 66
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
Mark sorting error in longRowProcessor as downstream #1099
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hi,
i understand the point, but i would recommend not to mix errorsource
into this place.
what do you think about this alternative:
- the caller (athena in this case), can check the returned error, and if it this error, it can mark it as downstream
but right now it's hard to detect this specific error, so i recommend doing a change in this place, something like this:
var ErrorSeriesUnsorted = errors.new("long series must be sorted ascending by time to be converted");
.
.
.
func process() {
.
.
.
if .... {
return ErrorSeriesUnsorted;
}
}
and then in the athena datasource you can do errors.Is()
to check the returned error, and if it is this error, mark it.
alternatively, you may consider any error returned from process()
as a downstream error.. i'm not sure, did not think too deeply about it, but it may be right.
I haven't looked much at the code, but isn't this actually our error? If we want to process result and we require it to be sorted, shouldn't we sort it before processing them? |
Sorting can be resource intensive, and generally databases will do it more efficiently - so I think it is better to suggest that the user sort the data (although in the FE case that processing falls on the browser). |
@kylebrandt Then we should probably improve the error to something like
@gabor, I see your point, but also I am wondering what would be the downside or marking it as downstrem in here. I fully agree and like |
I think that is better, helps guide users to fix. |
I did a follow up in #1134 |
hi (sorry for the delay). i think the problem is, it's not guaranteed the error is in other words, the error is |
What this PR does / why we need it:
We've been getting plugin errors reported for Athena (and some other plugins):
long series must be sorted ascending by time to be converted: Could not process SQL results
. This seems like a downstream/user error, but lmk if that's not the case.Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: