[MDEV-17686] BIGINT type doesn't work within CAST Created: 2018-11-12 Updated: 2019-03-29 |
|
| Status: | Stalled |
| Project: | MariaDB Server |
| Component/s: | Data types |
| Fix Version/s: | None |
| Type: | Task | Priority: | Minor |
| Reporter: | Paul Pogonyshev | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 1 |
| Labels: | None | ||
| Description |
|
I need the following for the workaround suggested in SELECT CAST(NULL AS BIGINT) However, this gives a syntax error. Using INT instead works, but I don't know if MariaDB will now cut unioned values for the same column: SELECT CAST(NULL AS INT) |
| Comments |
| Comment by Elena Stepanova [ 2018-11-12 ] |
|
CAST and CONVERT only support a subset of data types, BIGINT is not one of them. |
| Comment by Paul Pogonyshev [ 2018-11-12 ] |
|
And what is the reason? If I have a generic application, why does it have to special-case BIGINT instead of just casting to whatever type it needs? What should I use in place of BIGINT for a query similar to that in |
| Comment by Elena Stepanova [ 2018-11-12 ] |
|
If you want to contribute a patch which changes the behavior to better, we'll be happy to consider it. |
| Comment by Paul Pogonyshev [ 2018-11-13 ] |
|
So, according to |
| Comment by Elena Stepanova [ 2018-11-13 ] |
|
There is still hope that For CAST limitations, however upsetting they are, even if we had the capacity to lift some of them, it would not go to 10.3 which is already in the post-GA stage; and it would be very unlikely to make it to 10.4, unless somebody contributes a patch of a good quality which could be merged into the main tree easily enough. |
| Comment by Chris Calender (Inactive) [ 2019-01-10 ] |
|
Changed from Closed bug to Open Feature Request. |