You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "ArnavBalyan (via GitHub)" <gi...@apache.org> on 2026/06/12 07:29:06 UTC

[PR] [common] Fix npe on null value map(k, v) cast [paimon]

ArnavBalyan opened a new pull request, #8218:
URL: https://github.com/apache/paimon/pull/8218

   ### Purpose
    -  cast('map(k, null)' as map<string, int>) fails with npe, but the equivalent bracket form cast('{k -> null}' as map<string, int>) succeeds.
    - Bracket parser uses HashMap.put permits null. Function parser uses Collectors.toMap which rejects null.
    - The shared parseValue already returns null for the literal "null", so null is part of the intended input contract.
    - Switch the function parser to a HashMap.put loop matching the bracket parser. Both forms now behave the same.
   
   ### Tests
    - UT


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [common] Fix npe on null value map(k, v) cast [paimon]

Posted by "ArnavBalyan (via GitHub)" <gi...@apache.org>.
ArnavBalyan commented on PR #8218:
URL: https://github.com/apache/paimon/pull/8218#issuecomment-4688609430

   cc @JingsongLi @leaves12138 thanks! :) 


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [common] Fix npe on null value map(k, v) cast [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on PR #8218:
URL: https://github.com/apache/paimon/pull/8218#issuecomment-4697190519

   +1


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [common] Fix npe on null value map(k, v) cast [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #8218:
URL: https://github.com/apache/paimon/pull/8218


-- 
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: issues-unsubscribe@paimon.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org