Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.11.0
Description
The result is error when casting binary type as varchar type.
For example,
@Test def testCast1(): Unit = { testSqlApi( "CAST(X'68656c6c6f' as varchar)", "hello") }
The result is
Expected :hello Actual :[B@57fae983
It is right as follow,
@Test def testCast(): Unit = { testSqlApi( "CAST(CAST(X'68656c6c6f' as varbinary) as varchar)", "hello") }
We just need to change
case (VARBINARY, VARCHAR | CHAR)
to
case (BINARY | VARBINARY, VARCHAR | CHAR)
in ScalarOperatorGens#generateCast.
Attachments
Issue Links
- links to