Skip to content

Commit 7b23286

Browse files
tlm365jayzhan211
authored andcommitted
Remove warning logs during the document build process (apache#13324)
Signed-off-by: Tai Le Manh <[email protected]>
1 parent 064d24c commit 7b23286

File tree

5 files changed

+38
-33
lines changed

5 files changed

+38
-33
lines changed

docs/source/conf.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,9 @@
119119

120120
# enable nice rendering of checkboxes for the task lists
121121
myst_enable_extensions = ["colon_fence", "deflist", "tasklist"]
122+
123+
# Some code blocks (sql) are not being highlighted correctly, due to the
124+
# presence of some special characters like: 🚀, å, {,... But this isn’t a major
125+
# issue for our documentation. So, suppress these warnings to keep our build
126+
# log cleaner.
127+
suppress_warnings = ['misc.highlighting_failure']

docs/source/contributor-guide/howtos.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,15 @@ Below is a checklist of what you need to do to add a new scalar function to Data
4949
- Run `./dev/update_function_docs.sh` to update docs
5050

5151
[advanced_udf.rs]: https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/advanced_udaf.rs
52+
[datafusion/expr/src]: https://github.com/apache/datafusion/tree/main/datafusion/expr/src
5253
[sqllogictest/test_files]: https://github.com/apache/datafusion/tree/main/datafusion/sqllogictest/test_files
5354

5455
## How to add a new aggregate function
5556

5657
Below is a checklist of what you need to do to add a new aggregate function to DataFusion:
5758

5859
- Add the actual implementation of an `Accumulator` and `AggregateExpr`:
59-
- In [datafusion/expr/src](../../../datafusion/expr/src/aggregate_function.rs), add:
60+
- In [datafusion/expr/src], add:
6061
- a new variant to `AggregateFunction`
6162
- a new entry to `FromStr` with the name of the function as called by SQL
6263
- a new line in `return_type` with the expected return type of the function, given an incoming type

docs/source/library-user-guide/profiling.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
The section contains examples how to perform CPU profiling for Apache DataFusion on different operating systems.
2323

24-
### Building a flamegraph
24+
## Building a flamegraph
2525

2626
[Video: how to CPU profile DataFusion with a Flamegraph](https://youtu.be/2z11xtYw_xs)
2727

@@ -34,19 +34,19 @@ in images such as this:
3434

3535
## MacOS
3636

37-
#### Step 1: Install the flamegraph Tool
37+
### Step 1: Install the flamegraph Tool
3838

3939
To install flamegraph, run:
4040

4141
```shell
4242
cargo install flamegraph
4343
```
4444

45-
#### Step 2: Prepare Your Environment
45+
### Step 2: Prepare Your Environment
4646

4747
Ensure that you're in the directory containing the necessary data files for your DataFusion query. The flamegraph tool will profile the execution of your query against this data.
4848

49-
#### Step 3: Running the Flamegraph Tool
49+
### Step 3: Running the Flamegraph Tool
5050

5151
To generate a flamegraph, you'll need to use the -- separator to pass arguments to the binary you're profiling. For datafusion-cli, you need to make sure to run the command with sudo permissions (especially on macOS, where DTrace requires elevated privileges).
5252

docs/source/library-user-guide/query-optimizer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ let optimizer = Optimizer::with_rules(vec![
6868
## Writing Optimization Rules
6969

7070
Please refer to the
71-
[optimizer_rule.rs](../../datafusion-examples/examples/optimizer_rule.rs)
71+
[optimizer_rule.rs](../../../datafusion-examples/examples/optimizer_rule.rs)
7272
example to learn more about the general approach to writing optimizer rules and
7373
then move onto studying the existing rules.
7474

docs/source/user-guide/sql/scalar_functions.md

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -3983,44 +3983,42 @@ make_map(['key1', 'key2'], ['value1', 'value2'])
39833983

39843984
#### Example
39853985

3986-
````sql
3987-
-- Using map function
3988-
SELECT MAP('type', 'test');
3989-
----
3990-
{type: test}
3991-
3992-
SELECT MAP(['POST', 'HEAD', 'PATCH'], [41, 33, null]);
3993-
----
3994-
{POST: 41, HEAD: 33, PATCH: }
3986+
```sql
3987+
-- Using map function
3988+
SELECT MAP('type', 'test');
3989+
----
3990+
{type: test}
39953991

3996-
SELECT MAP([[1,2], [3,4]], ['a', 'b']);
3997-
----
3998-
{[1, 2]: a, [3, 4]: b}
3992+
SELECT MAP(['POST', 'HEAD', 'PATCH'], [41, 33, null]);
3993+
----
3994+
{POST: 41, HEAD: 33, PATCH: }
39993995

4000-
SELECT MAP { 'a': 1, 'b': 2 };
4001-
----
4002-
{a: 1, b: 2}
3996+
SELECT MAP([[1,2], [3,4]], ['a', 'b']);
3997+
----
3998+
{[1, 2]: a, [3, 4]: b}
40033999

4004-
-- Using make_map function
4005-
SELECT MAKE_MAP(['POST', 'HEAD'], [41, 33]);
4006-
----
4007-
{POST: 41, HEAD: 33}
4000+
SELECT MAP { 'a': 1, 'b': 2 };
4001+
----
4002+
{a: 1, b: 2}
40084003

4009-
SELECT MAKE_MAP(['key1', 'key2'], ['value1', null]);
4010-
----
4011-
{key1: value1, key2: }
4012-
```
4004+
-- Using make_map function
4005+
SELECT MAKE_MAP(['POST', 'HEAD'], [41, 33]);
4006+
----
4007+
{POST: 41, HEAD: 33}
40134008

4009+
SELECT MAKE_MAP(['key1', 'key2'], ['value1', null]);
4010+
----
4011+
{key1: value1, key2: }
4012+
```
40144013

40154014
### `map_extract`
40164015

40174016
Returns a list containing the value for the given key or an empty list if the key is not present in the map.
40184017

4019-
````
4020-
4018+
```
40214019
map_extract(map, key)
4020+
```
40224021

4023-
````
40244022
#### Arguments
40254023

40264024
- **map**: Map expression. Can be a constant, column, or function, and any combination of map operators.
@@ -4040,7 +4038,7 @@ SELECT map_extract(MAP {1: 'one', 2: 'two'}, 2);
40404038
SELECT map_extract(MAP {'x': 10, 'y': NULL, 'z': 30}, 'y');
40414039
----
40424040
[]
4043-
````
4041+
```
40444042

40454043
#### Aliases
40464044

0 commit comments

Comments
 (0)