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

fix: selectedFields on getRows not working correctly #712

Merged
merged 11 commits into from Jun 16, 2020

Conversation

laljikanjareeya
Copy link
Contributor

Fixes #702

Data from Back-end is retrieving correctly, but mapping of the data with the schema fields has an issue.
On below line schema fields and data mapping is based on index so, it will map always first property even if user doesn't selected that property.

const schemaField = schema.fields![index];

Solution:
Back-end data is retrieving same order as schema fields order, solution for this is to filter schema based on selected fields when selectedFields is provided by user.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Jun 7, 2020
@codecov
Copy link

codecov bot commented Jun 7, 2020

Codecov Report

Merging #712 into master will increase coverage by 0.00%.
The diff coverage is 97.56%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #712   +/-   ##
=======================================
  Coverage   95.16%   95.17%           
=======================================
  Files           7        7           
  Lines        6311     6341   +30     
  Branches      369      371    +2     
=======================================
+ Hits         6006     6035   +29     
- Misses        305      306    +1     
Impacted Files Coverage Δ
src/bigquery.ts 99.94% <97.22%> (-0.06%) ⬇️
src/table.ts 99.95% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd4c040...1b0b2ec. Read the comment docs.

@steffnay
Copy link
Contributor

steffnay commented Jun 9, 2020

Looks good to me. Pending second review from @stephenplusplus

src/bigquery.ts Outdated Show resolved Hide resolved
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Jun 16, 2020
@laljikanjareeya
Copy link
Contributor Author

@googlebot I fixed it.

@bcoe bcoe added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Jun 16, 2020
@googlebot
Copy link

A Googler has manually verified that the CLAs look good.

(Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.)

ℹ️ Googlers: Go here for more info.

@bcoe bcoe merged commit 13b7e39 into googleapis:master Jun 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

selectedFields on getRows not working correctly
5 participants