FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat: support partitioned dml in dbapi by ankiaga · Pull Request #1103 · googleapis/python-spanner · GitHub

This repository was archived by the owner on Jun 8, 2026. It is now read-only.
/ python-spanner Public archive

feat: support partitioned dml in dbapi - #1103

Merged
ankiaga merged 5 commits into
mainfrom
partitioned_dml
Feb 20, 2024
Merged

feat: support partitioned dml in dbapi#1103
ankiaga merged 5 commits into
mainfrom
partitioned_dml

Conversation

ankiaga commented Feb 15, 2024

Copy link
Copy Markdown
Contributor

No description provided.

ankiaga requested review from a team February 15, 2024 07:38
product-auto-label Bot added the size: m Pull request size is medium. label Feb 15, 2024
product-auto-label Bot added the api: spanner Issues related to the googleapis/python-spanner API. label Feb 15, 2024
olavloite changed the title feat: Implementation to support executing partitioned dml query at dbapi feat: support partitioned dml in dbapi Feb 19, 2024

@check_not_closed
def run_partition(self, encoded_partition_id):
def run_partition(self, parsed_statement: ParsedStatement):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This is a breaking change of a public method

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Reverted

)

@check_not_closed
def set_autocommit_dml_mode(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think that it would make more sense to have a public method that takes a AutocommitDmlMode enum value as an argument, rather than one that takes a parsed statement as an argument. This method looks like a private method that should only be called by our own parser.

Instead, we should:

  1. Have a private method that is basically the same as this.
  2. Have a public method that takes an AutocommitDmlMode enum as an input argument and that actually changes the value of the flag. That method would then also be usable for anyone using the dbapi driver programmatically, as they could just call that method to change the value.

See https://github.com/googleapis/java-spanner-jdbc/blob/910a130a02f72c4d8764f12e347f6c3d1bd51b2b/src/main/java/com/google/cloud/spanner/jdbc/CloudSpannerJdbcConnection.java#L136 for how the API in the JDBC driver looks.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Done

ankiaga enabled auto-merge (squash) February 20, 2024 13:09
ankiaga merged commit 3aab0ed into main Feb 20, 2024
ankiaga deleted the partitioned_dml branch February 20, 2024 14:01
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

api: spanner Issues related to the googleapis/python-spanner API. size: m Pull request size is medium.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL