-
Notifications
You must be signed in to change notification settings - Fork 32
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 builder.Intervals marshal and filter.Interval #68
Conversation
Double sketches
@jbguerraz @vigith A (go-druid builder query marshaled ) -> Proxy (tries to load json but fails) -> Druid. Please don't mind the older commits, I lost my local copy. We can squash these. |
does this fix #18 ? |
Thank you for the pointer! I fixed the filter's I verified the query output with multiple filters works:
|
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.
can you add a test where we marshal, unmarshal and then marshal and make sure it matches the input we started with?
thank you @cosmic-chichu !!! 🎆 |
Currently,
builder.Intervals
supports only complex interval types duringLoad
. But when marshaled it produces a simple interval. This behavior violates the expected idempotent behavior of marshaling and un-marshaling.Steps to reproduce:
Actual Output: ["2022-06-16T08:28:53.33441Z/2022-06-16T15:28:53.33441Z"]
Expected Output: {"type":"intervals","intervals":["2022-06-16T08:28:53.33441Z/2022-06-16T15:28:53.33441Z"]}
Note: This change ensures the intervals are always processed(input/output) as a well-defined struct.
Filters have a different struct defined for interval which only requires intervals of type
[]*intervals.Interval
.