title: Impala Query Error - AnalysisException: operands of type INT and STRING are not comparable
body: <p>I am trying to execute a query in Impala and getting the following error (AnalysisException: operands of type INT and STRING are not comparable: B.COMMENT_TYPE_CD = '100' ) can someone help me fix this: 
  Query:</p>
  
  <pre><code>SELECT 
  ORDER_ID,
  L1.LONG_TEXT
  FROM 
  DB.ORDER_COMMENT A,
  DB.SHORT_TEXT L1
  WHERE  ACTION_SEQUENCE = (
      SELECT MAX(ACTION_SEQUENCE) 
      FROM DB.ORDER_COMMENT B
      WHERE B.COMMENT_TYPE_CD='100' 
      AND A.ORDER_ID=B.ORDER_ID) 
  AND COMMENT_TYPE_CD='100'
  AND A.LONG_TEXT_ID=L1.LONG_TEXT_ID 
  AND L1.ACTIVE_IND=1  
  </code></pre>
  
  <p>Thanks</p>