Skip to content

[VL] Casting integer to binary type produces inconsistent result with Spark #5073

@philo-he

Description

@philo-he

Backend

VL (Velox)

Bug description

SELECT a, cast(a as binary) from tbl;

Spark result:

+---+-------------+
|  a|            a|
+---+-------------+
| 10|[00 00 00 0A]|
|  0|[00 00 00 00]|
|  3|[00 00 00 03]|
|  2|[00 00 00 02]|
|  2|[00 00 00 02]|
|  0|[00 00 00 00]|
+---+-------------+

Gluten result:

+---+-------+
|  a|      a|
+---+-------+
| 10|[31 30]|
|  0|   [30]|
|  3|   [33]|
|  2|   [32]|
|  2|   [32]|
|  0|   [30]|
+---+-------+

Spark version

None

Spark configurations

No response

System information

No response

Relevant logs

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingtriage

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions