Skip to content

Conversation

@olavloite
Copy link

The Spanner JDBC driver would consider queries that started with a statement hint as invalid statements. This change adds a check for statement hints at the beginning of a query, and accepts these as valid queries.

Fixes #6540.

See https://cloud.google.com/spanner/docs/query-syntax#sql-syntax for more information on statement hints.

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Oct 23, 2019
@codecov
Copy link

codecov bot commented Oct 23, 2019

Codecov Report

Merging #6553 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #6553      +/-   ##
============================================
+ Coverage     46.34%   46.35%   +<.01%     
- Complexity    27997    28001       +4     
============================================
  Files          2613     2613              
  Lines        288068   288075       +7     
  Branches      33778    33779       +1     
============================================
+ Hits         133519   133526       +7     
  Misses       144309   144309              
  Partials      10240    10240
Impacted Files Coverage Δ Complexity Δ
...com/google/cloud/spanner/jdbc/StatementParser.java 87.34% <100%> (+0.58%) 45 <5> (+4) ⬆️

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 e94fc0b...66cb698. Read the comment docs.

@olavloite olavloite requested a review from skuruppu October 23, 2019 14:15
@googlebot
Copy link

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: no This human has *not* signed the Contributor License Agreement. and removed cla: yes This human has signed the Contributor License Agreement. labels Oct 24, 2019
@olavloite
Copy link
Author

@skuruppu I accepted your suggested changes, but apparently that causes GitHub to seem to think that you have not signed the CLA. Could you have a look how that could be solved?

@skuruppu
Copy link

Sorry about the CLA issue @olavloite . I created a branch based on yours and rebased it to fix the email address. Please feel free to reset your branch based on mine or do the rebase again on your own branch.

@olavloite olavloite force-pushed the spanner-jdbc-allow-statement-hints branch from efc5fba to 7da39fc Compare October 25, 2019 05:12
The Spanner JDBC driver would consider queries that started with a
statement hint as invalid statements. This change adds a check for
statement hints at the beginning of a query, and accepts these as
valid queries.

Fixes googleapis#6540.
@olavloite olavloite force-pushed the spanner-jdbc-allow-statement-hints branch from 7da39fc to 66cb698 Compare October 25, 2019 06:13
@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

@googlebot googlebot added cla: yes This human has signed the Contributor License Agreement. and removed cla: no This human has *not* signed the Contributor License Agreement. labels Oct 25, 2019
@olavloite olavloite merged commit 5643f49 into googleapis:master Oct 25, 2019
@olavloite olavloite deleted the spanner-jdbc-allow-statement-hints branch October 25, 2019 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Spanner JDBC: Add support for query hints at start of query

4 participants