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(bigquery): preserve context buildup - only fetch on last statement #11660

Closed
wants to merge 2 commits into from

Conversation

mistercrunch
Copy link
Member

SUMMARY

More details here and in the rabbit hole #11637

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TEST PLAN

Code should only affect BigQuery, planning on writing a BigQ-specific test

@codecov-io
Copy link

codecov-io commented Nov 11, 2020

Codecov Report

Merging #11660 (5366747) into master (77dff0e) will decrease coverage by 3.34%.
The diff coverage is 77.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11660      +/-   ##
==========================================
- Coverage   65.61%   62.27%   -3.35%     
==========================================
  Files         873      873              
  Lines       42315    42313       -2     
  Branches     3971     3972       +1     
==========================================
- Hits        27765    26350    -1415     
- Misses      14433    15783    +1350     
- Partials      117      180      +63     
Flag Coverage Δ
cypress ?
javascript 62.84% <ø> (+<0.01%) ⬆️
python 61.92% <77.77%> (+0.01%) ⬆️

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

Impacted Files Coverage Δ
superset/db_engine_specs/exasol.py 81.81% <ø> (ø)
superset/db_engine_specs/hive.py 83.98% <ø> (ø)
superset/db_engine_specs/mssql.py 92.68% <ø> (ø)
superset/db_engine_specs/oracle.py 81.81% <ø> (ø)
superset/db_engine_specs/postgres.py 100.00% <ø> (ø)
superset/db_engine_specs/base.py 87.30% <66.66%> (-0.17%) ⬇️
superset/db_engine_specs/bigquery.py 95.74% <100.00%> (+0.04%) ⬆️
superset/sql_lab.py 80.38% <100.00%> (+0.09%) ⬆️
superset-frontend/src/explore/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
superset-frontend/src/dashboard/App.jsx 0.00% <0.00%> (-100.00%) ⬇️
... and 155 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 77dff0e...5366747. Read the comment docs.

@@ -353,9 +354,16 @@ def execute_sql_statements( # pylint: disable=too-many-arguments, too-many-loca
logger.info("Query %s: %s", str(query_id), msg)
query.set_extra_json_key("progress", msg)
session.commit()
Copy link

Choose a reason for hiding this comment

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

Does this call commit on the cursor? I was thinking in googleapis/python-bigquery#377 that we'd flush any batched queries when a commit was called, but it sounds like this may also not be desirable.

Copy link
Member Author

Choose a reason for hiding this comment

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

Oh that's a different session with our metadata database to log the state of the queries, unrelated to the analytics DB

@mistercrunch
Copy link
Member Author

Built on false assumptions, closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants