-
Notifications
You must be signed in to change notification settings - Fork 57
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
experimental/sdata: Add RefID to writers and readers #627
Conversation
func emptyFrameWithTypeMD(refID string, t data.FrameType, v data.FrameTypeVersion) *data.Frame { | ||
f := data.NewFrame("").SetMeta(&data.FrameMeta{Type: t, TypeVersion: v}) | ||
f.RefID = refID | ||
return f | ||
} |
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.
will there be any side effects using empty frame name? Should we fallback to refID as frame name?
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.
I don't think so. The frame name is never given any meaning in any of these data types currently. So having it zero valued seems appropriate.
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.
By any chance transformations will break with inconsistent frame names? ( for a same query, valid results have different frame name when no results have empty frame name )
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.
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.
yea fine. Just we need to aware of this and document that the frame names can potentially empty or duplicate. so that consumers can use it foolproof.
This makes it so Frames are creating with a RefID which was skipped before.
We do insert this in other parts of the SDK for datasources, but probably better to keep it clear, and I need to specify it in SSE.