Skip to content

Parsing error with parenthesized multi-term constant expression in SELECT #2489

@Phasheng

Description

@Phasheng

Summary

Using parentheses around a constant arithmetic expression with three or more terms causes a transaction commit error, while similar expressions without parentheses or with only two terms work fine.

Version:

25.8.1

How to repeat

Run the following query:

SELECT (1+1+1) AS ref0

An error will be caused. However, the three queries below work fine:

SELECT 1+1+1 as ref0
SELECT 1+1 as ref0
SELECT (1+1) as ref0

Expected result

(1+1+1) and 1+1+1 are two mathematically equivalent expressions, so I expect the same results.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions