Content-Length: 277824 | pFad | https://github.com/googleapis/langchain-google-spanner-python/issues/90

63C fix: Use Spanner's UPSERT over INSERT by aperepel · Pull Request #90 · googleapis/langchain-google-spanner-python · GitHub
Skip to content

fix: Use Spanner's UPSERT over INSERT #90

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

Merged
merged 1 commit into from
Sep 20, 2024
Merged

Conversation

aperepel
Copy link
Contributor

Switch to UPSERT. This provides for a nice experience for DELETE-then-INSERT use cases in Spanner when the primary key stays the same. Otherwise the DELETE is not pushed before INSERT and the client gets a 409 Row [abc] already exists. The way LangChain integration is designed, there is no easy way to wrap them all in a TX with additional args for such visibility.

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #<issue_number_goes_here> 🦕

…-INSERT use cases in Spanner when the primary key stays the same. Otherwise the DELETE is not pushed before INSERT and the client gets a 409 Row [abc] already exists. The way LangChain integration is designed, there is no easy way to wrap them all in a TX with additional args for such visibility.
Copy link

conventional-commit-lint-gcf bot commented Sep 19, 2024

🤖 I detect that the PR title and the commit message differ and there's only one commit. To use the PR title for the commit history, you can use Github's automerge feature with squashing, or use automerge label. Good luck human!

-- conventional-commit-lint bot
https://conventionalcommits.org/

@product-auto-label product-auto-label bot added the api: spanner Issues related to the googleapis/langchain-google-spanner-python API. label Sep 19, 2024
@averikitsch
Copy link
Collaborator

/gcbrun

@averikitsch averikitsch changed the title Switch to Spanner's UPSERT. fix: Use Spanner's UPSERT over INSERT Sep 20, 2024
@averikitsch averikitsch merged commit 2637e2d into googleapis:main Sep 20, 2024
11 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the googleapis/langchain-google-spanner-python API.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: https://github.com/googleapis/langchain-google-spanner-python/issues/90

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy