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

The LIMIT expression is not working #172

Closed
kallydev opened this issue Apr 15, 2024 · 0 comments · Fixed by #245
Closed

The LIMIT expression is not working #172

kallydev opened this issue Apr 15, 2024 · 0 comments · Fixed by #245

Comments

@kallydev
Copy link

The planbuiler is expecting github.com/dolthub/go-mysql-server/sql/expression.Literal instead of github.com/dolthub/dolthub/doltgresql/server/expression.Literal.

doltgres=> SELECT * FROM hits LIMIT 1;
ERROR:  invalid limit. expected expression.Literal, found *expression.Literal (errno 1105) (sqlstate HY000)

In addition, the type of parameter used to construct this error message is inaccurate.

https://github.com/dolthub/go-mysql-server/blob/bce49039f35d94d6d67a594ced33abaab75a59ee/sql/planbuilder/select.go#L189

- err := sql.ErrInvalidTypeForLimit.New(expression.Literal{}, e)
+ err := sql.ErrInvalidTypeForLimit.New(new(expression.Literal), e)
@kallydev kallydev changed the title The LIMIT expression is not available The LIMIT expression is not working Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant