Weijun-H commented on PR #13340:
URL: https://github.com/apache/datafusion/pull/13340#issuecomment-2466718368

   After some investigation, we can fix this issue through this modification.
   
   
https://github.com/apache/datafusion/blob/c48f12d27cc60ae5e9c3d0791d553453f0dd7001/datafusion/functions-nested/src/map.rs#L263-L291
   
   ```rust
                       .with_sql_example(
   r#"
   ```sql
   -- Using map function
   SELECT MAP('type', 'test');
   ----
   {type: test}
   
   SELECT MAP(['POST', 'HEAD', 'PATCH'], [41, 33, null]);
   ----
   {POST: 41, HEAD: 33, PATCH: }
   
   SELECT MAP([[1,2], [3,4]], ['a', 'b']);
   ----
   {[1, 2]: a, [3, 4]: b}
   
   SELECT MAP { 'a': 1, 'b': 2 };
   ----
   {a: 1, b: 2}
   
   -- Using make_map function
   SELECT MAKE_MAP(['POST', 'HEAD'], [41, 33]);
   ----
   {POST: 41, HEAD: 33}
   
   SELECT MAKE_MAP(['key1', 'key2'], ['value1', null]);
   ----
   {key1: value1, key2: }
   ```"#,
                       )
   ```


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to