apache / apache/gluten

[VL] When performing a cast to int operation, an abnormal libgcc_s.so occurs

Open
#10,067 2 comments 0 reactions 0 assignees View on GitHub
bug triage
Dominant language
Scala
Stars
1.6k
Forks
657
Avg merge
2d 14h
Merged PRs (30d)
80

Description

### Backend

VL (Velox)

### Bug description

When I execute
select count(1) from my_table where id > 0 (id in this table is string type),
scan and filter takes extra long (total execution time is about 400s in local mode). And abnormal libgcc.so appears in the flame graph.
But when I change to
select count(1) from my_table where id != '0'
or select count(1) from my_table where cast(id as double) >0,
the time is only about 150s. (Converting to double takes some extra time, but the flame graph is normal)

id != '0' 's flamegraph:

![Image](https://github.com/user-attachments/assets/3a67a9de-3878-456e-8c5b-404ffd28ee3b)

cast(id as double) >0 's flamegraph:

![Image](https://github.com/user-attachments/assets/9a226786-263e-49a7-ace7-16329ec0d096)

where cast (id as int) > 0 's flamegraph:

![Image](https://github.com/user-attachments/assets/3fd21296-ab1f-4159-be4e-d537a42b11cc)

### Gluten version

Gluten-1.3

### Spark version

Spark-3.2.x

### Spark configurations

_No response_

### System information

--executor-memory 5g \
--driver-memory 3g \
--queue etron_dataz_new \
--conf spark.sql.legacy.allowNonEmptyLocationInCTAS=true \
--conf spark.memory.offHeap.enabled=true \
--conf spark.memory.offHeap.size=10g \
--conf spark.executor.memoryOverhead=2g \
--conf spark.shuffle.service.enabled=false \
--conf spark.sql.adaptive.enabled=true \
--conf spark.sql.optimizer.runtime.bloomFilter.applicationSideScanSizeThreshold=0 \
--conf spark.sql.optimizer.runtime.bloomFilter.enabled=true \
--conf spark.gluten.sql.columnar.physicalJoinOptimizeEnable=true \
--conf spark.gluten.sql.columnar.physicalJoinOptimizationLevel=18 \
--conf spark.gluten.sql.columnar.logicalJoinOptimizeEnable=true \
--conf spark.gluten.sql.columnar.logicalJoinOptimizationLevel=19 \

### Relevant logs

```bash

```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.