Skip to content

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

@dzou

Description

@dzou

Hello, I wanted to request a feature for the Spanner JDBC driver - would it be possible to add support for Spanner queries that begin with a query hint expression?

In the Spanner syntax, it appears valid in some cases for the query hints to appear at the very beginning of a query. From the syntax diagram:

query_statement:
    [ table_hint_expr ][ join_hint_expr ]
    query_expr

So running something like: @{JOIN_METHOD=HASH_JOIN} SELECT * FROM PersonsTable ... should be valid.

However I think at present this is considered an invalid query because the query begins with a query hint and not one of the support keywords like SELECT, ALTER, etc. Would it be reasonable to add support for this?

cc/ @olavloite

Metadata

Metadata

Assignees

Labels

api: spannerIssues related to the Spanner API.type: feature request‘Nice-to-have’ improvement, new feature or different behavior or design.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions