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

   ### Purpose
   
   String-to-MAP casting split entries first and then used a regex to separate 
key from value, so quote state for the individual key or value was gone by the 
time `parseValue` ran. `{"" -> a}` lost the empty key and `{k -> "null"}` 
became a SQL NULL value.
   
   This change splits entries and then key/value with `TokenSplitter.splitRaw` 
so quotes survive, then parses each side through `TokenSplitter.split` the same 
way ARRAY and ROW already do.
   
   Fixes #9782
   
   ### Tests
   
   `mvn -pl paimon-common -DwildcardSuites=none -Dtest=CastExecutorTest 
spotless:check test` passed (46 tests). Coverage includes quoted empty 
keys/values, quoted vs unquoted null, escaped null, quotes around `->` and `,`, 
and the `MAP()` function form.
   
   Validation observed for this change:
   - `mvn -pl paimon-common -DwildcardSuites=none -Dtest=CastExecutorTest 
spotless:check test`
   
   Fixes #9782
   
   <!-- repo-agent-case:6cf10689-af12-4ec3-bef2-ceabded51e7f -->


-- 
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