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

StatementParser only supports one query hint #163

Description

@elefeint

Hello! We've found an obscure select query that the statement parser does not support yet.

Observed behavior

The following evaluates to false:

boolean isQuery = StatementParser.INSTANCE.isQuery("@{FORCE_INDEX=index_name} @{JOIN_METHOD=HASH_JOIN} SELECT * FROM tbl");

Expected behavior

Query Statement with multiple hints is recognized as a valid query.

External references such as API reference guides

Spanner queries can have one of each: query, table and join hint preceding SELECT statement.

Any additional information below

We found this when migrating R2DBC driver from a custom statement parser to the connection API one; this test caught the issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

api: spannerIssues related to the googleapis/java-spanner API.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions