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

feat: add FluxRecord.row with response data stored in Array #118

Merged
merged 11 commits into from
Oct 7, 2022

Conversation

michaelahojna
Copy link
Contributor

@michaelahojna michaelahojna commented Oct 6, 2022

Proposed Changes

Adding possibility of accessing response data in Array FluxRecord.row.

In case of using pivot on data, where field contains labels that occur by default in the annotated CSV (f.e. "result" or "table"), could be duplicated column names in response. In that case FluxRecord.values (Hash), which can hold only unique keys, doesn't show complete data. This edge case is solved by using FluxRecord.row (Array).

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • A test has been added if appropriate
  • rake test completes successfully
  • Commit messages are conventional
  • Sign CLA (if not already signed)

@michaelahojna michaelahojna marked this pull request as ready for review October 6, 2022 09:47
Copy link
Contributor

@bednar bednar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR 👍
There are a few requirements that must be be satisfy before we accept the PR:

influxdb-client.gemspec Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented Oct 6, 2022

Codecov Report

Base: 51.07% // Head: 51.12% // Increases project coverage by +0.04% 🎉

Coverage data is based on head (188aa1e) compared to base (d2e7c44).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #118      +/-   ##
==========================================
+ Coverage   51.07%   51.12%   +0.04%     
==========================================
  Files          65       65              
  Lines        6349     6355       +6     
==========================================
+ Hits         3243     3249       +6     
  Misses       3106     3106              
Impacted Files Coverage Δ
lib/influxdb2/client/flux_csv_parser.rb 100.00% <100.00%> (ø)
lib/influxdb2/client/flux_table.rb 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

lib/influxdb2/client/flux_csv_parser.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@bednar bednar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🌹

@bednar bednar merged commit 76ad2f4 into master Oct 7, 2022
@bednar bednar deleted the record-row branch October 7, 2022 11:37
@bednar bednar added this to the 2.8.0 milestone Oct 7, 2022
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.

None yet

3 participants