Hi,

I noticed that the behavior of VARCHAR in cast expression changes in recent
drillbit server. In the cast expression, VARCHAR without length specifier
will be treated as  varchar(1) now.

For example,  the following query:

select (1234 as VARCHAR) from sys.drillbits

returns '1' instead of '1234'.

Is this change intended?

As a reference, SQL server treated it differently:

http://msdn.microsoft.com/en-CA/library/ms176089.aspx

"(For char/varchar), when n is not specified in a data definition or
variable declaration statement, the default length is 1. When n is not
specified when using the CAST and CONVERT functions, the default length is
30"
Best,

Xiao

Reply via email to