-
Notifications
You must be signed in to change notification settings - Fork 3.9k
chore: update read stats to use xcap #20095
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
Conversation
rfratto
left a comment
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.
Great to see the line count go down :)
| // Close closes the Reader. Closed Readers can be reused by calling | ||
| // [Reader.Reset]. | ||
| func (r *Reader) Close() error { | ||
| r.region.End() |
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.
This should check to see if region is nil, since if you create a Reader and immediately close it without reading first, region won't be defined and this will panic
| // Column statistics | ||
| PrimaryColumns uint64 // Number of primary columns to read from the dataset | ||
| SecondaryColumns uint64 // Number of secondary columns to read from the dataset | ||
| StatPrimaryColumns = xcap.NewStatisticInt64("primary.columns", xcap.AggregationTypeSum) |
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.
nit: do these need to be exported?
| agg.Record(o) | ||
| } | ||
|
|
||
| func (r *Region) Observations() []AggregatedObservation { |
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.
nit: please add doc comments for public methods 🙏
be3da82 to
601dfcc
Compare
What this PR does / why we need it:
Updates dataset reader to capture observations to xcap region which gets linked as child to the parent operation's region (DataObjscan, streamsview or Metastore)
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Checklist
CONTRIBUTING.mdguide (required)featPRs are unlikely to be accepted unless a case can be made for the feature actually being a bug fix to existing behavior.docs/sources/setup/upgrade/_index.mddeprecated-config.yamlanddeleted-config.yamlfiles respectively in thetools/deprecated-config-checkerdirectory. Example PR