Skip to content

Commit

Permalink
Fix sphinx warnings (#9142)
Browse files Browse the repository at this point in the history
* Fix 'Configuration Settings' link in write_options.md

* Fix multiple reference definition in scalar_functions.md

* Fix typo: 'contcat_ws' to 'concat_ws' in scalar_functions.md

* Add missing section 'array_contains' in scalar_functions.md

* Fix reference warnings in operators.md

* Remove unsupported syntax 'csv' from code blocks of adding-udfs.md

* Fix syntax tag in example-usage.md

* Change syntax tag of code blocks that contain multiple syntaxes of
cli.md

* Remove 'sql' syntax tags from code blocks

* Remove leading ❯ in sql code blocks
  • Loading branch information
ongchi authored Feb 9, 2024
1 parent cdc5d00 commit ae88235
Show file tree
Hide file tree
Showing 14 changed files with 127 additions and 100 deletions.
4 changes: 2 additions & 2 deletions docs/source/library-user-guide/adding-udfs.md
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ At this point, you can use the `smooth_it` function in your query:

For example, if we have a [`cars.csv`](https://github.com/apache/arrow-datafusion/blob/main/datafusion/core/tests/data/cars.csv) whose contents like

```csv
```
car,speed,time
red,20.0,1996-04-12T12:05:03.000000000
red,20.3,1996-04-12T12:05:04.000000000
Expand Down Expand Up @@ -279,7 +279,7 @@ df.show().await?;

the output will be like:

```csv
```
+-------+-------+--------------------+---------------------+
| car | speed | smooth_speed | time |
+-------+-------+--------------------+---------------------+
Expand Down
9 changes: 4 additions & 5 deletions docs/source/user-guide/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ You can also query directly from the remote location via HTTP(S) without
registering the location as a table
```sql
select count(*) from 'https://datasets.clickhouse.com/hits_compatible/athena_partitioned/hits_1.parquet'
select count(*) from 'https://datasets.clickhouse.com/hits_compatible/athena_partitioned/hits_1.parquet'
+----------+
| COUNT(*) |
+----------+
Expand Down Expand Up @@ -285,7 +285,7 @@ LOCATION 'https://datasets.clickhouse.com/hits_compatible/athena_partitioned/hit
```
```sql
select count(*) from hits;
select count(*) from hits;
+----------+
| COUNT(*) |
+----------+
Expand Down Expand Up @@ -583,7 +583,7 @@ For example, to set `datafusion.execution.batch_size` to `1024` you
would set the `DATAFUSION_EXECUTION_BATCH_SIZE` environment variable
appropriately:
```SQL
```shell
$ DATAFUSION_EXECUTION_BATCH_SIZE=1024 datafusion-cli
DataFusion CLI v12.0.0
❯ show all;
Expand All @@ -603,10 +603,9 @@ DataFusion CLI v12.0.0
You can change the configuration options using `SET` statement as well
```SQL
```shell
$ datafusion-cli
DataFusion CLI v13.0.0
❯ show datafusion.execution.batch_size;
+---------------------------------+---------+
| name | value |
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user-guide/example-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ codegen-units = 1

Then, in `main.rs.` update the memory allocator with the below after your imports:

```rust,ignore
```rust ,ignore
use datafusion::prelude::*;

#[global_allocator]
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user-guide/expressions.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ but these operators always return a `bool` which makes them not work with the ex
Unlike to some databases the math functions in Datafusion works the same way as Rust math functions, avoiding failing on corner cases e.g

```sql
select log(-1), log(0), sqrt(-1);
select log(-1), log(0), sqrt(-1);
+----------------+---------------+-----------------+
| log(Int64(-1)) | log(Int64(0)) | sqrt(Int64(-1)) |
+----------------+---------------+-----------------+
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user-guide/sql/data_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ You can see the corresponding Arrow type for any SQL expression using
the `arrow_typeof` function. For example:

```sql
select arrow_typeof(interval '1 month');
select arrow_typeof(interval '1 month');
+-------------------------------------+
| arrowtypeof(IntervalYearMonth("1")) |
+-------------------------------------+
Expand All @@ -41,7 +41,7 @@ You can cast a SQL expression to a specific Arrow type using the `arrow_cast` fu
For example, to cast the output of `now()` to a `Timestamp` with second precision:

```sql
select arrow_cast(now(), 'Timestamp(Second, None)');
select arrow_cast(now(), 'Timestamp(Second, None)');
+---------------------+
| now() |
+---------------------+
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user-guide/sql/ddl.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ LOCATION '/path/to/aggregate_test_100.csv';

Where `WITH ORDER` clause specifies the sort order:

```sql
```
WITH ORDER (sort_expression1 [ASC | DESC] [NULLS { FIRST | LAST }]
[, sort_expression2 [ASC | DESC] [NULLS { FIRST | LAST }] ...])
```
Expand Down
4 changes: 2 additions & 2 deletions docs/source/user-guide/sql/explain.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ EXPLAIN [ANALYZE] [VERBOSE] statement
Shows the execution plan of a statement.
If you need more detailed output, use `EXPLAIN VERBOSE`.

```sql
```
EXPLAIN SELECT SUM(x) FROM table GROUP BY b;
+---------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type | plan |
Expand All @@ -54,7 +54,7 @@ EXPLAIN SELECT SUM(x) FROM table GROUP BY b;
Shows the execution plan and metrics of a statement.
If you need more information output, use `EXPLAIN ANALYZE VERBOSE`.

```sql
```
EXPLAIN ANALYZE SELECT SUM(x) FROM table GROUP BY b;
+-------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| plan_type | plan |
Expand Down
2 changes: 1 addition & 1 deletion docs/source/user-guide/sql/information_schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ or
To show the current session configuration options, use the `SHOW ALL` command or the `information_schema.df_settings` view:

```sql
select * from information_schema.df_settings;
select * from information_schema.df_settings;

+-------------------------------------------------+---------+
| name | setting |
Expand Down
Loading

0 comments on commit ae88235

Please sign in to comment.