xiedeyantu commented on code in PR #4406:
URL: https://github.com/apache/calcite/pull/4406#discussion_r2128184235


##########
core/src/main/java/org/apache/calcite/sql/dialect/PrestoSqlDialect.java:
##########
@@ -248,10 +278,12 @@ public static void unparseMapValue(SqlWriter writer, 
SqlCall call,
    */
   public static SqlCall convertMapValueCall(SqlCall call) {
     boolean unnestMap = call.operandCount() > 0
-        && call.getOperandList().stream().allMatch(operand -> operand 
instanceof SqlLiteral);
+        && (call.getOperandList().get(0) instanceof SqlLiteral
+        || call.getOperandList().get(1) instanceof SqlLiteral);
     if (!unnestMap) {
       return call;
     }
+

Review Comment:
   ```suggestion
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to