Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-5252

A condition returns always true

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • 1.10.0
    • None

    Description

      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

      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
      

      Should it be like this?

      292     }
      293     return value.getMajorType().equals(e.getMajorType());
      294   }
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lifove JC
              Paul Rogers Paul Rogers
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: