lowka opened a new issue, #10743:
URL: https://github.com/apache/datafusion/issues/10743
### Describe the bug
Since Datafusion has no Utf8(n) type precision/length parameter of
varchar/char types is ignored and this leads to unexpected results in CAST
expressions.
### To Reproduce
The following sqllogic test demonstrates the problem (DataFusion returns
12345 instead of 12):
```text
query T
SELECT '12345'::VARCHAR(2)
----
12
```
### Expected behavior
I would expect the following return either:
- '12' because casts to Varchar(n) should perform truncation.
- an error since DataFusion has no Utf8(n) type and than silently ignoring
length parameter.
### Additional context
DDL statements also allow varchar/char(n) types but n parameter is also
silently ignored.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]