-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: Change Iterator base on google guideline #131
base: main
Are you sure you want to change the base?
Conversation
@bednar @vlastahajek Should we deprecate the QueryIterator? 🤔 |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #131 +/- ##
==========================================
- Coverage 88.11% 86.41% -1.71%
==========================================
Files 15 16 +1
Lines 1346 1413 +67
==========================================
+ Hits 1186 1221 +35
- Misses 134 160 +26
- Partials 26 32 +6 ☔ View full report in Codecov by Sentry. |
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.
Nice! LGTM
return it.index | ||
} | ||
|
||
func asPoints(record arrow.Record, index int) (*PointValues, error) { |
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 method is almost the same as in query_iterator.go
. Please, refactor it so there is only one such logic.
it.index++ | ||
|
||
for it.record == nil || it.index >= int(it.record.NumRows()) { | ||
if !it.reader.Next() { |
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.
flight.Reader.Next()
can produce an error and return false
.
We should check for the error and act accordingly.
Closes #
Proposed Changes
_ Rewrite QueryIterator base on google guidelines
Link issue: Issue
Guidelines suggested Guidelines
Checklist