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

SQL Lab commit connection even if no CTA query is made #16036

Closed
3 tasks done
jbouzekri opened this issue Aug 2, 2021 · 2 comments
Closed
3 tasks done

SQL Lab commit connection even if no CTA query is made #16036

jbouzekri opened this issue Aug 2, 2021 · 2 comments
Labels
#bug Bug report inactive Inactive for >= 30 days

Comments

@jbouzekri
Copy link

SQL Lab query editor on run commit the connection even if all we do is a select on a database without CTA enabled. This is not really an issue with most database system however there are problems when using superset with Mongo BI connector which does not support transaction and I assume any other system which does not too.

Expected results

The commit should only be done if a CTA query needs to be run

Actual results

A commit is always done

Environment

  • superset docker image version: 1.2
  • mongo: 5.0
  • mongo bi connector: 2.14

Checklist

  • I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • I have reproduced the issue with at least the latest released version of superset.
  • I have checked the issue tracker for the same issue and I haven't found one similar.

Additional context

The commit is done here :

conn.commit()

I think that just replacing it like this would do the trick :

# Commit the connection so CTA queries will create the table.
if apply_ctas:
    conn.commit()
@stale
Copy link

stale bot commented Apr 30, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

@stale stale bot added the inactive Inactive for >= 30 days label Apr 30, 2022
@rusackas
Copy link
Member

This looks like it should have been closed by the linked PR, and has gone stale anyway.... holler if there's a need to keep this open!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
#bug Bug report inactive Inactive for >= 30 days
Projects
None yet
Development

No branches or pull requests

2 participants