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: create table with long name #13871

Merged
merged 1 commit into from
Mar 31, 2021

Conversation

betodealmeida
Copy link
Member

SUMMARY

Make superset load-examples -b create a table with a long name (64 characters, the limit), so we can test #13858.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TEST PLAN

  1. superset load-examples -b -t
  2. Verified that table called zcZ6VHUhetxSu1N6R9DAF1nv6IqmPd4EnmqNuWaL5sXyEYTIiPTZhMJMkoGTg9VE (random) was created.

ADDITIONAL INFORMATION

  • Has associated issue:
  • 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

@@ -68,3 +70,7 @@ def load_big_data() -> None:
]
for i in range(1000):
add_data(columns=columns, num_rows=10, table_name=f"small_table_{i}")

print("Creating table with long name")
name = "".join(random.choices(string.ascii_letters + string.digits, k=64))
Copy link
Member

Choose a reason for hiding this comment

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

I think @amitmiran137 already create a get_random_string function in test utils:

def get_random_string(length):

Maybe consolidate?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think it's possible to import the get_random_string function here, so are you suggesting moving it outside the tests/ directory and reusing it both here and in the test?

@codecov
Copy link

codecov bot commented Mar 30, 2021

Codecov Report

Merging #13871 (196769d) into master (9d0bb3a) will increase coverage by 0.72%.
The diff coverage is 68.75%.

❗ Current head 196769d differs from pull request most recent head 709dd0c. Consider uploading reports for the commit 709dd0c to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13871      +/-   ##
==========================================
+ Coverage   76.78%   77.50%   +0.72%     
==========================================
  Files         935      938       +3     
  Lines       47292    47385      +93     
  Branches     5895     5943      +48     
==========================================
+ Hits        36311    36726     +415     
+ Misses      10824    10515     -309     
+ Partials      157      144      -13     
Flag Coverage Δ
cypress 56.02% <100.00%> (+3.71%) ⬆️
hive 80.29% <64.28%> (-0.01%) ⬇️
mysql 80.59% <64.28%> (-0.01%) ⬇️
postgres 80.62% <64.28%> (-0.01%) ⬇️
presto 80.29% <64.28%> (-0.01%) ⬇️
python 81.13% <64.28%> (-0.01%) ⬇️
sqlite 80.19% <64.28%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
superset-frontend/src/views/CRUD/alert/types.ts 100.00% <ø> (ø)
superset/reports/logs/api.py 95.45% <ø> (ø)
superset/tasks/scheduler.py 0.00% <0.00%> (ø)
superset/examples/big_data.py 35.00% <40.00%> (+1.66%) ⬆️
.../src/explore/components/controls/SelectControl.jsx 93.75% <100.00%> (+4.46%) ⬆️
...set-frontend/src/views/CRUD/alert/ExecutionLog.tsx 100.00% <100.00%> (ø)
superset/models/reports.py 100.00% <100.00%> (ø)
superset/reports/commands/execute.py 93.58% <100.00%> (+0.14%) ⬆️
superset-frontend/src/components/CheckboxIcons.tsx 71.42% <0.00%> (-14.29%) ⬇️
...end/src/views/CRUD/data/database/DatabaseModal.tsx 71.75% <0.00%> (-5.22%) ⬇️
... and 65 more

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 f81b746...709dd0c. Read the comment docs.

@betodealmeida betodealmeida merged commit 11dd249 into apache:master Mar 31, 2021
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 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/XS 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants