Skip to content

Commit 7ebd993

Browse files
authored
Fix scalar_functions.md for CI (#13340)
* fix format of document ci * remove the indent of mpa example
1 parent a20b318 commit 7ebd993

File tree

1 file changed

+28
-27
lines changed
  • datafusion/functions-nested/src

1 file changed

+28
-27
lines changed

datafusion/functions-nested/src/map.rs

Lines changed: 28 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -261,33 +261,34 @@ fn get_map_doc() -> &'static Documentation {
261261
"map(key, value)\nmap(key: value)\nmake_map(['key1', 'key2'], ['value1', 'value2'])"
262262
)
263263
.with_sql_example(
264-
r#"```sql
265-
-- Using map function
266-
SELECT MAP('type', 'test');
267-
----
268-
{type: test}
269-
270-
SELECT MAP(['POST', 'HEAD', 'PATCH'], [41, 33, null]);
271-
----
272-
{POST: 41, HEAD: 33, PATCH: }
273-
274-
SELECT MAP([[1,2], [3,4]], ['a', 'b']);
275-
----
276-
{[1, 2]: a, [3, 4]: b}
277-
278-
SELECT MAP { 'a': 1, 'b': 2 };
279-
----
280-
{a: 1, b: 2}
281-
282-
-- Using make_map function
283-
SELECT MAKE_MAP(['POST', 'HEAD'], [41, 33]);
284-
----
285-
{POST: 41, HEAD: 33}
286-
287-
SELECT MAKE_MAP(['key1', 'key2'], ['value1', null]);
288-
----
289-
{key1: value1, key2: }
290-
```"#
264+
r#"
265+
```sql
266+
-- Using map function
267+
SELECT MAP('type', 'test');
268+
----
269+
{type: test}
270+
271+
SELECT MAP(['POST', 'HEAD', 'PATCH'], [41, 33, null]);
272+
----
273+
{POST: 41, HEAD: 33, PATCH: }
274+
275+
SELECT MAP([[1,2], [3,4]], ['a', 'b']);
276+
----
277+
{[1, 2]: a, [3, 4]: b}
278+
279+
SELECT MAP { 'a': 1, 'b': 2 };
280+
----
281+
{a: 1, b: 2}
282+
283+
-- Using make_map function
284+
SELECT MAKE_MAP(['POST', 'HEAD'], [41, 33]);
285+
----
286+
{POST: 41, HEAD: 33}
287+
288+
SELECT MAKE_MAP(['key1', 'key2'], ['value1', null]);
289+
----
290+
{key1: value1, key2: }
291+
```"#,
291292
)
292293
.with_argument(
293294
"key",

0 commit comments

Comments
 (0)