[Fix](Variant) fix variant predicate rewrite OrToIn with wrong plan (#28695)

using the name without paths info will lead to wrong In plan, e.g.
```
where cast(v:a as text) = 'hello' or cast(v:b as text) = 'world'
```
will be rewrite to:
```
where cast(v as text) in ('hello', 'world')
``
This is wrong, because they are different slots
This commit is contained in:
lihangyu
2023-12-22 11:51:36 +08:00
committed by GitHub
parent 0af6bd6390
commit f6b6180462
3 changed files with 21 additions and 0 deletions

View File

@ -540,6 +540,9 @@ public class SlotRef extends Expr {
}
public String getColumnName() {
if (subColPath != null && !subColPath.isEmpty()) {
return col + "." + String.join(".", subColPath);
}
return col;
}