[
https://issues.apache.org/jira/browse/DRILL-5252?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15950024#comment-15950024
]
Rahul Challapalli commented on DRILL-5252:
------------------------------------------
When I ran the below query on 1.9.0, I cannot reproduce the issue. Its clear
that I am not hitting that code path. Otherwise, drill would have returned all
the records. However my expectation is that the left side is a typed null
constant and the right side is a logical expression which is also a typed null
constant.
{code}
select * from cp.`tpch/region.parquet` where cast(null as int) = cast(null as
int) + 5;
+--------------+---------+------------+
| r_regionkey | r_name | r_comment |
+--------------+---------+------------+
+--------------+---------+------------+
{code}
> A condition returns always true
> -------------------------------
>
> Key: DRILL-5252
> URL: https://issues.apache.org/jira/browse/DRILL-5252
> Project: Apache Drill
> Issue Type: Bug
> Reporter: JC
> Priority: Minor
> Labels: ready-to-commit
> Fix For: 1.10.0
>
>
> I've found the following code smell in recent github snapshot.
> Path:
> exec/java-exec/src/main/java/org/apache/drill/exec/expr/EqualityVisitor.java
> {code:java}
> 287
> 288 @Override
> 289 public Boolean visitNullConstant(TypedNullConstant e, LogicalExpression
> value) throws RuntimeException {
> 290 if (!(value instanceof TypedNullConstant)) {
> 291 return false;
> 292 }
> 293 return e.getMajorType().equals(e.getMajorType());
> 294 }
> 295
> {code}
> Should it be like this?
> {code:java}
> 292 }
> 293 return value.getMajorType().equals(e.getMajorType());
> 294 }
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)