Skip to content
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

Merged
merged 3 commits into from
Jan 24, 2025
Merged

Adds Datum#row() #1729

merged 3 commits into from
Jan 24, 2025

Conversation

johnedquinn
Copy link
Member

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.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.03%. Comparing base (4bf549b) to head (e3a930d).
Report is 19 commits behind head on main.

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           
Flag Coverage Δ
EXAMPLES 80.03% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

alancai98
alancai98 previously approved these changes Jan 24, 2025
Copy link
Member

@alancai98 alancai98 left a 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) {
Copy link
Member

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

@johnedquinn johnedquinn merged commit da32279 into partiql:main Jan 24, 2025
7 checks passed
@johnedquinn johnedquinn deleted the main-datum-row branch January 24, 2025 22:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants