apache / apache/gluten

[CH] Not any table column is used in the join condition.

Open
#9,598 0 comments 0 reactions 0 assignees View on GitHub
bug triage
Dominant language
Scala
Stars
1.6k
Forks
657
Avg merge
2d 21h
Merged PRs (30d)
85

Description

### Backend

CH (ClickHouse)

### Bug description

[Expected behavior] and [actual behavior].

The post filter condition in join is
```
post_join_filter {
literal {
null {
bool {
nullability: NULLABILITY_NULLABLE
}
}
}
}
```
It comes from following query
```
select uid from t where uid in (select uid from t1 where partitionkey = 'xxx')
```

where `partitionkey = 'xxx'` filt out all data.

### Gluten version

_No response_

### Spark version

None

### Spark configurations

_No response_

### System information

_No response_

### Relevant logs

```bash

```

Contributor guide

Open the contributing guide

Research direction

Start with the reported query and the generated post_join_filter containing a nullable null literal, then trace how the partitionkey = 'xxx' predicate is represented when it filters out all data. Done means the query no longer produces the invalid join-condition warning and its result matches the expected behavior for an empty filtered subquery.

Written by the indexing model from the issue text.

Assessment

Tech stack
clickhouse
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.