Skip to content

Parser: Keep a slice stride when the upper bound is omitted - #3065

Open
yussypu wants to merge 1 commit into
apache:mainfrom
yussypu:slice-stride-display
Open

yussypu wants to merge 1 commit into
apache:mainfrom
yussypu:slice-stride-display

Conversation

@yussypu

@yussypu yussypu commented Nov 28, 2026

Copy link
Copy Markdown

Dialects: DuckDB

Closes #2807

([1, 2, 3, 4, 5, 6, 7, 8, 9])[1: :4] parsed :4 as a placeholder upper bound, and a slice with a stride but no upper bound displayed as [1::4], which tokenizes as a cast. The parser now leaves the upper bound empty when the next token is :, and Display separates the two colons. DuckDB slicing: https://duckdb.org/docs/stable/sql/functions/list#slicing

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Slice with a stride and no upper bound (arr[1: :4]) is displayed as arr[1::4], which doesn't parse

1 participant