Skip to content

Spanner DB API incorrectly classifying queries beginning with brackets #347

@larkee

Description

@larkee

spanner_dbapi is incorrectly classifying the following query as STMT_UPDATING due to the initial bracket:

(SELECT some_table.id, some_table.x, some_table.y 
FROM some_table 
WHERE some_table.id = 2 ORDER BY some_table.id
 LIMIT 1) UNION DISTINCT (SELECT some_table.id, some_table.x, some_table.y 
FROM some_table 
WHERE some_table.id = 3 ORDER BY some_table.id
 LIMIT 1) ORDER BY id
 LIMIT 2

It looks like the SQL parsing RE expressions may need some work to handle queries which include brackets.

Metadata

Metadata

Assignees

Labels

api: spannerIssues related to the googleapis/python-spanner API.priority: p2Moderately-important priority. Fix may not be included in 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