Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/889#discussion_r134424551
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/join/JoinUtils.java
 ---
    @@ -231,6 +236,12 @@ public static boolean isScalarSubquery(RelNode root) {
             return true;
           }
         }
    +    if (!hasMoreInputs && currentRel != null) {
    +      double rowSize = 
RelMetadataQuery.instance().getMaxRowCount(currentRel);
    --- End diff --
    
    As @vvysotskyi has noted, `getMaxRowCount` returns `Double` and may return 
`null` if this method is not overriden in the operator [1]. I guess it would be 
safer to assign value to `Double` and use `equals` for comparison in this case 
(`new Double(1.0).equals(rowSize)`).
    
    [1] 
https://github.com/apache/calcite/blob/ceca631872ec64fa345f7df9cdf185e1f9252449/core/src/main/java/org/apache/calcite/rel/metadata/RelMdMaxRowCount.java#L182


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to