Kyligence / ClickHouse

ClickHouse® is a free analytics DBMS for big data
https://clickhouse.com
Apache License 2.0
14 stars 17 forks source link

Different result of length(binary) between gluten and vanilla #413

Closed taiyang-li closed 1 year ago

taiyang-li commented 1 year ago
set spark.gluten.enabled=false;
select length(binary(id)) from range(10);  // returns 8

set spark.gluten.enabled=true;
select length(binary(id)) from range(10);  // returns 1
taiyang-li commented 1 year ago

Another issue: cast(x as String) and cast(x as Binary) has different behaviors in Spark, but they are all translated to toString(x) in CH

Actually: