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(sqllab): missing zero values while copy-to-clipboard #21153

Merged

Conversation

justinpark
Copy link
Member

SUMMARY

Since JS returns false for zero values, following value existence statement data[i][key] skips the zero values.

if (data[i][key]) {
row[j] = data[i][key];
} else {
row[j] = data[i][parseFloat(key)];
}
}
result += `${Object.values(row).join('\t')}\n`;

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

copy-to-clipboard-for-zeros.mov

TESTING INSTRUCTIONS

  1. Go to Sql Lab
  2. Run the following query
SELECT 'copy to clipboard',
        0 as zero,
        1 as one
  1. "Copy to clipboard"
  2. Paste to a note

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@codecov
Copy link

codecov bot commented Aug 22, 2022

Codecov Report

Merging #21153 (ce68697) into master (0bf4e56) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master   #21153   +/-   ##
=======================================
  Coverage   66.16%   66.16%           
=======================================
  Files        1773     1773           
  Lines       67689    67689           
  Branches     7218     7218           
=======================================
  Hits        44786    44786           
  Misses      21059    21059           
  Partials     1844     1844           
Flag Coverage Δ
javascript 52.12% <100.00%> (ø)

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

Impacted Files Coverage Δ
superset-frontend/src/utils/common.js 90.00% <100.00%> (ø)

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

Copy link
Member

@stephenLYZ stephenLYZ left a comment

Choose a reason for hiding this comment

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

LGTM

@ktmud ktmud merged commit 4e23d62 into apache:master Aug 26, 2022
eschutho pushed a commit that referenced this pull request Sep 20, 2022
Fahrenheit35 pushed a commit to Fahrenheit35/superset that referenced this pull request Nov 11, 2022
@mistercrunch mistercrunch added 🍒 2.0.1 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 2.1.0 and removed 🚢 2.1.3 labels Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/S v2.0 v2.0.1 🍒 2.0.1 🚢 2.1.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants