-
Notifications
You must be signed in to change notification settings - Fork 61
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
Adds Datum#row()
#1729
Adds Datum#row()
#1729
Conversation
db3c126
to
e3a930d
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1729 +/- ##
=========================================
Coverage 80.03% 80.03%
Complexity 47 47
=========================================
Files 19 19
Lines 506 506
Branches 23 23
=========================================
Hits 405 405
Misses 88 88
Partials 13 13
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ 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.
couple minor comments. otherwise looks good
return PType.row(fieldTypes); | ||
} | ||
|
||
private void addFieldToStruct(Map<String, List<Datum>> struct, String key, Datum value) { |
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: functions and vars could be renamed to use row rather than struct
Co-authored-by: Alan Cai <[email protected]>
Description
Adds the ability to create rows.
Note: we already implicitly did this under the hood, but now we're making it apparent and more user-friendly. When writing the usage guide on how to create implementations of
Table
, I realized we couldn't outright create a ROW, even though we specified the type to be a ROW. So, adding this so that I can call the right API in the usage guide.License Information
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.