GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: support client-side hints for tags and priority by olavloite · Pull Request #3005 · googleapis/java-spanner

This repository was archived by the owner on Aug 30, 2026. It is now read-only.

Conversation

@olavloite

@olavloite olavloite commented Apr 4, 2024

Copy link
Copy Markdown
Contributor

Supports including a hint in the SQL string to set a statement tag or an RPC priority for a single SQL statement in the Connection API. This makes it easier to use these features from frameworks and tools that only support SQL statements.

Replaces #2978

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@olavloite
feat: support client-side hints for tags and priority
5930619
Supports including a hint in the SQL string to set a statement tag
or an RPC priority for a single SQL statement in the Connection API.
This makes it easier to use these features from frameworks and
tools that only support SQL statements.
@olavloite
olavloite requested a review from a team April 4, 2024 15:29
@product-auto-label product-auto-label Bot added size: xl Pull request size is extra large. api: spanner Issues related to the googleapis/java-spanner API. labels Apr 4, 2024
@gcf-owl-bot
🦉 Updates from OwlBot post-processor
f5cb043
See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md
@olavloite
olavloite requested a review from a team April 4, 2024 15:32
@olavloite olavloite mentioned this pull request Apr 5, 2024
feat: support statement tags in comments in Connection API #2978
Closed
@olavloite
olavloite requested review from ankiaga and manu2 April 8, 2024 15:24
arpan14
arpan14 reviewed Apr 18, 2024
View reviewed changes
Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/SimpleParser.java
* started by a prefix with the given length (e.g. either '#' or '--').
*/
@VisibleForTesting
boolean skipSingleLineComment(int prefixLength) {

@arpan14 arpan14 Apr 18, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Would it be possible to somehow refactor and re-use skipSingleLineComment and skipMultiLineComment defined in AbstractStatementParser?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@olavloite olavloite Apr 19, 2024

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Good point. But I've modified it to be the other way around; AbstractStatementParser now uses the implementation in SimpleParser. The long-term goal is to replace AbstractStatementParser (which is largely regex based) with SimpleParser (which is token based).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
arpan14
arpan14 reviewed Apr 18, 2024
View reviewed changes
Comment thread google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/SimpleParser.java Outdated
* Returns true if the given character is valid as the first character of an identifier. That
* means that it can be used as the first character of an unquoted identifier.
*/
private boolean isValidIdentifierFirstChar(char c) {

@arpan14 arpan14 Apr 18, 2024

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

The methods isValidIdentifierFirstChar and isValidIdentifierChar already exist in AbstractStatementParser. Is there a way to re-use?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@olavloite olavloite Apr 19, 2024

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Yes. Same here; the implementation in SimpleParser is preferred.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
arpan14
arpan14 approved these changes Apr 18, 2024
View reviewed changes
olavloite added 2 commits April 19, 2024 09:49
@olavloite
Merge branch 'main' into client-side-hints
7067509
@olavloite
chore: re-use SimpleParser methods in AbstractStatementParser
d42e8d8
@olavloite olavloite added the automerge Merge the pull request once unit tests and other checks pass. label Apr 19, 2024
@gcf-merge-on-green
gcf-merge-on-green Bot merged commit 48828df into main Apr 19, 2024
@gcf-merge-on-green
gcf-merge-on-green Bot deleted the client-side-hints branch April 19, 2024 09:12
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Apr 19, 2024
@release-please release-please Bot mentioned this pull request Apr 19, 2024
chore(main): release 6.65.0 #3037
Merged
gcf-merge-on-green Bot pushed a commit that referenced this pull request Apr 20, 2024
@release-please
chore(main): release 6.65.0 (#3037)
e3be384
🤖 I have created a release *beep* *boop*
---


## [6.65.0](https://togithub.com/googleapis/java-spanner/compare/v6.64.0...v6.65.0) (2024-04-20)


### Features

* Remove grpclb ([#2760](https://togithub.com/googleapis/java-spanner/issues/2760)) ([1df09d9](https://togithub.com/googleapis/java-spanner/commit/1df09d9b9189c5527de91189a063ecc15779ac77))
* Support client-side hints for tags and priority ([#3005](https://togithub.com/googleapis/java-spanner/issues/3005)) ([48828df](https://togithub.com/googleapis/java-spanner/commit/48828df3489465bb53a18be50808fbd435f3e896)), closes [#2978](https://togithub.com/googleapis/java-spanner/issues/2978)


### Bug Fixes

* **deps:** Update the Java code generator (gapic-generator-java) to 2.39.0 ([#3001](https://togithub.com/googleapis/java-spanner/issues/3001)) ([6cec1bf](https://togithub.com/googleapis/java-spanner/commit/6cec1bf1bb44a52c62c2310447c6a068a88209ea))
* NullPointerException on AbstractReadContext.span ([#3036](https://togithub.com/googleapis/java-spanner/issues/3036)) ([55732fd](https://togithub.com/googleapis/java-spanner/commit/55732fd107ac1d3b8c16eee198c904d54d98b2b4))


### Dependencies

* Update dependency com.google.cloud:sdk-platform-java-config to v3.29.0 ([#3045](https://togithub.com/googleapis/java-spanner/issues/3045)) ([67a6534](https://togithub.com/googleapis/java-spanner/commit/67a65346d5a01d118d5220230e3bed6db7e79a33))
* Update dependency commons-cli:commons-cli to v1.7.0 ([#3043](https://togithub.com/googleapis/java-spanner/issues/3043)) ([9fea7a3](https://togithub.com/googleapis/java-spanner/commit/9fea7a30e90227e735ad3595f4ca58dfb1ca1b93))

---
This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@manu2 manu2 Awaiting requested review from manu2
@ankiaga ankiaga Awaiting requested review from ankiaga
1 more reviewer
@arpan14 arpan14 arpan14 approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

api: spanner Issues related to the googleapis/java-spanner API. size: xl Pull request size is extra large.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@olavloite @arpan14
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.