Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support list slicing with negative index #9036

Open
Weijun-H opened this issue Jan 29, 2024 · 2 comments
Open

support list slicing with negative index #9036

Weijun-H opened this issue Jan 29, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@Weijun-H
Copy link
Member

Is your feature request related to a problem or challenge?

sqlparser-rs does not support these syntax.

❯ select [1,2,3][-1:-3:-2];  🤔 Invalid statement: sql parser error: Expected a value, found: -
❯ select [1,2,3][-1:-3];  🤔 Invalid statement: sql parser error: Expected a value, found: -

This is not valid in duckdb too, try select ([1,2,3])[-1:-3]

This Is the problem of sqlparser-rs, apache/datafusion-sqlparser-rs#1108.

Originally posted by @Weijun-H in #8946 (comment)

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

@Weijun-H Weijun-H added the enhancement New feature or request label Jan 29, 2024
@Tangruilin
Copy link
Contributor

@Weijun-H Are you working on this now?

@Weijun-H
Copy link
Member Author

Weijun-H commented Jan 29, 2024

@Weijun-H Are you working on this now?

Hi @Tangruilin , I am not working on it. And this issue is caused by sqlparser-rs, not datafusion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants