docs: private static boolean subqueryRequiresScalarValueExpressionFromContext(AbstractExpression parentExpr) {
          if (parentExpr == null) {
              // No context: we are a top-level expression.  E.g, an item on the
              // select list.  In this case, assume the expression must be scalar.
              return true;
          }
  
          // Exists and comparison operators can handle non-scalar subqueries.
          if (parentExpr.getExpressionType() == ExpressionType.OPERATOR_EXISTS
                  || parentExpr instanceof ComparisonExpression) {
              return false;
          }
  
          // There is already a ScalarValueExpression above the subquery.
          if (parentExpr instanceof ScalarValueExpression) {
              return false;
          }
  
          // By default, assume that the subquery must produce a single value.
          return true;
      }