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

Snow 855088 Set row mode array to mapping result set as array. Add suffix for duplicated columns during mapping to js objects. #591

Merged
merged 2 commits into from
Aug 2, 2023

Conversation

sfc-gh-pmotacki
Copy link
Collaborator

@sfc-gh-pmotacki sfc-gh-pmotacki commented Jul 24, 2023

Description

Execute select can contains in result duplicated column names. Because the result is mapped to javascript object so we lost elements for duplicated column names. After changes client can decide about mapping by setting a mode (object or array). For row mode 'object' and duplicated columns object keys will be suffixed with column identifiers.

Checklist

  • Format code according to the existing code style (run npm run lint:check -- CHANGED_FILES and fix problems in changed code)
  • Create tests which fail without the change (if possible)
  • Make all tests (unit and integration) pass (npm run test:unit and npm run test:integration)
  • Extend the README / documentation and ensure is properly displayed (if necessary)
  • Provide JIRA issue id (if possible) or GitHub issue id in commit message

lib/connection/result/result.js Outdated Show resolved Hide resolved
lib/connection/result/row_stream.js Outdated Show resolved Hide resolved
lib/connection/result/row_stream.js Outdated Show resolved Hide resolved
test/integration/testStreamRows.js Outdated Show resolved Hide resolved
@sfc-gh-pmotacki sfc-gh-pmotacki changed the title Snow 855088 Snow 855088 Set row mode array to mapping result set as array. Add suffix for duplicated columns during mapping to js objects. Jul 24, 2023
lib/connection/connection_config.js Outdated Show resolved Hide resolved
lib/connection/connection_config.js Outdated Show resolved Hide resolved
lib/connection/result/result.js Outdated Show resolved Hide resolved
lib/connection/result/row_stream.js Outdated Show resolved Hide resolved
lib/connection/result/row_stream.js Outdated Show resolved Hide resolved
test/integration/testStreamRows.js Outdated Show resolved Hide resolved
test/unit/connection/result/result_test.js Outdated Show resolved Hide resolved
test/integration/testStreamRows.js Outdated Show resolved Hide resolved
test/integration/testStreamRows.js Outdated Show resolved Hide resolved
test/unit/snowflake_test.js Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jul 24, 2023

Codecov Report

Merging #591 (f4b61d3) into master (296f05a) will increase coverage by 0.19%.
The diff coverage is 98.92%.

@@            Coverage Diff             @@
##           master     #591      +/-   ##
==========================================
+ Coverage   84.59%   84.78%   +0.19%     
==========================================
  Files          54       56       +2     
  Lines        5135     5200      +65     
==========================================
+ Hits         4344     4409      +65     
  Misses        791      791              
Files Changed Coverage Δ
lib/connection/statement.js 90.88% <95.00%> (+0.11%) ⬆️
lib/connection/connection_config.js 96.98% <100.00%> (+0.06%) ⬆️
lib/connection/result/column.js 95.42% <100.00%> (ø)
lib/connection/result/result.js 87.20% <100.00%> (+0.24%) ⬆️
lib/connection/result/row_stream.js 96.18% <100.00%> (+0.12%) ⬆️
...ib/connection/result/unique_column_name_creator.js 100.00% <100.00%> (ø)
lib/constants/error_messages.js 100.00% <100.00%> (ø)
lib/constants/row_mode.js 100.00% <100.00%> (ø)
lib/errors.js 96.46% <100.00%> (+0.01%) ⬆️

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@sfc-gh-pmotacki sfc-gh-pmotacki force-pushed the SNOW-855088 branch 2 times, most recently from f6599bf to cc63674 Compare July 26, 2023 10:06
lib/connection/connection_config.js Outdated Show resolved Hide resolved
lib/connection/result/row_stream.js Outdated Show resolved Hide resolved
lib/connection/connection_config.js Outdated Show resolved Hide resolved
lib/connection/statement.js Outdated Show resolved Hide resolved
lib/connection/statement.js Outdated Show resolved Hide resolved
test/integration/testRowMode.js Outdated Show resolved Hide resolved
test/integration/testRowMode.js Show resolved Hide resolved
test/integration/testRowMode.js Outdated Show resolved Hide resolved
test/integration/testRowMode.js Outdated Show resolved Hide resolved
test/integration/testStreamRows.js Outdated Show resolved Hide resolved
@sfc-gh-pmotacki sfc-gh-pmotacki force-pushed the SNOW-855088 branch 2 times, most recently from 78741c8 to 753e9c0 Compare July 27, 2023 16:35
@wpride
Copy link

wpride commented Jul 28, 2023

Hell yes, I've been running a fork for two years for this change! 🎉

test/integration/testRowMode.js Outdated Show resolved Hide resolved
lib/connection/result/row_stream.js Outdated Show resolved Hide resolved
test/integration/testRowMode.js Outdated Show resolved Hide resolved
test/integration/testRowMode.js Show resolved Hide resolved
lib/connection/result/row_stream.js Outdated Show resolved Hide resolved
lib/connection/result/row_stream.js Outdated Show resolved Hide resolved
lib/connection/statement.js Outdated Show resolved Hide resolved
test/integration/testRowMode.js Outdated Show resolved Hide resolved
test/integration/testRowMode.js Outdated Show resolved Hide resolved
test/integration/testRowMode.js Outdated Show resolved Hide resolved
test/integration/testStreamRows.js Show resolved Hide resolved
lib/connection/result/result.js Outdated Show resolved Hide resolved
lib/constants/row_mode.js Outdated Show resolved Hide resolved
test/integration/testRowMode.js Outdated Show resolved Hide resolved
test/integration/testRowMode.js Outdated Show resolved Hide resolved
test/integration/testRowMode.js Outdated Show resolved Hide resolved
test/integration/testRowMode.js Outdated Show resolved Hide resolved
test/integration/testRowMode.js Show resolved Hide resolved
test/integration/testStreamRows.js Outdated Show resolved Hide resolved
@sfc-gh-pmotacki sfc-gh-pmotacki force-pushed the SNOW-855088 branch 4 times, most recently from bd1fd7c to ebb81df Compare July 31, 2023 15:46
test/integration/testRowMode.js Outdated Show resolved Hide resolved
test/integration/testRowMode.js Show resolved Hide resolved
test/integration/testStreamRows.js Outdated Show resolved Hide resolved
@sfc-gh-pmotacki sfc-gh-pmotacki force-pushed the SNOW-855088 branch 3 times, most recently from ed649e4 to dffb5ec Compare August 1, 2023 12:53
lib/connection/result/result.js Outdated Show resolved Hide resolved
lib/connection/result/unique_column_name_creator.js Outdated Show resolved Hide resolved
lib/connection/statement.js Outdated Show resolved Hide resolved
lib/connection/statement.js Outdated Show resolved Hide resolved
lib/connection/statement.js Outdated Show resolved Hide resolved
lib/constants/row_mode.js Show resolved Hide resolved
lib/constants/row_mode.js Show resolved Hide resolved
@sfc-gh-pmotacki sfc-gh-pmotacki merged commit c0722f3 into master Aug 2, 2023
19 checks passed
@sfc-gh-pmotacki sfc-gh-pmotacki deleted the SNOW-855088 branch August 2, 2023 22:28
@github-actions github-actions bot locked and limited conversation to collaborators Aug 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants