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

Substring function does not support CHAR type #3457

Closed
ebyhr opened this issue Apr 17, 2020 · 3 comments · Fixed by #3949
Closed

Substring function does not support CHAR type #3457

ebyhr opened this issue Apr 17, 2020 · 3 comments · Fixed by #3949
Assignees
Milestone

Comments

@ebyhr
Copy link
Member

ebyhr commented Apr 17, 2020

While substr function accepts char type, substring function doesn't.

SELECT substr(cast('abcd1234' as char(8)), 1, 4);
→ OK
SELECT substring(cast('abcd1234' as char(8)), 1, 4);
→ Unexpected parameters (char(8), integer, integer) for function substring. Expected: substring(varchar(x), bigint, bigint) , substring(varchar(x), bigint)

https://prestosql.io/docs/current/functions/teradata.html

@ebyhr ebyhr added the good first issue Good for newcomers label Apr 17, 2020
@findepi
Copy link
Member

findepi commented Apr 17, 2020

substring is part of teradata functions
(when we have function namespaces, this will be more clear to users as well).

@ebyhr did you check that substring in teradata works with char values too?

@findepi findepi removed the good first issue Good for newcomers label Apr 17, 2020
@findepi
Copy link
Member

findepi commented Apr 17, 2020

Requires #3456 being resolved first.

@ebyhr
Copy link
Member Author

ebyhr commented Apr 17, 2020

Yes, I checked it before filing the issue.

@ebyhr ebyhr self-assigned this Jun 7, 2020
@findepi findepi added this to the 335 milestone Jun 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants