コード例 #1
0
    @Override
    protected Type visitLogicalBinaryExpression(
        LogicalBinaryExpression node, AnalysisContext context) {
      coerceType(context, node.getLeft(), BOOLEAN, "Left side of logical expression");
      coerceType(context, node.getRight(), BOOLEAN, "Right side of logical expression");

      expressionTypes.put(node, BOOLEAN);
      return BOOLEAN;
    }
コード例 #2
0
ファイル: ExpressionFormatter.java プロジェクト: Rokum/presto
 @Override
 protected String visitLogicalBinaryExpression(
     LogicalBinaryExpression node, Boolean unmangleNames) {
   return formatBinaryExpression(
       node.getType().toString(), node.getLeft(), node.getRight(), unmangleNames);
 }